[Add indirect comparison predicate clinton@unknownlamer.org**20081113112557 * Used to sort containers of pointers using the pointed to objects' comparison methods ] { hunk ./source/Utils.H 3 -// Copyright (c) 2002,2005 Clinton Ebadi +// Copyright (c) 2002,2005,2008 Clinton Ebadi hunk ./source/Utils.H 70 + + // Class to compare *i1 / *i2 in heaps etc. + template class IndirectPred + { + C compare; + public: + bool operator() (const T * i1, const T * i2) const + { return compare (*i1, *i2); } + + typedef T* first_argument_type; + typedef T* second_argument_type; + typedef bool result_type; + }; }