// Utils.H -*- C++ -*-
// Copyright (c) 1997, 1998 Etienne BERNARD
-// Copyright (c) 2002,2005 Clinton Ebadi
+// Copyright (c) 2002,2005,2008 Clinton Ebadi
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
std::string scm2str (SCM);
SCM str2scm (std::string);
#endif
+
+ // Class to compare *i1 / *i2 in heaps etc.
+ template<typename T, typename C> 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;
+ };
}
#endif