#include #include class thing { public: thing( int a_, int b_ ) : a(a_), b(b_) {} public: int a; int b; }; class cmpthings { public: bool operator() ( const thing& lhs, const thing& rhs ) const { return lhs.a > rhs.a; } bool operator() ( const thing& lhs, const thing& rhs ) { return lhs.a > rhs.a; } }; int main(){ cmpthings ord; boost::heap::skew_heap> vpq(ord); vpq.emplace(5,6); }