// ---------------------------------------------------------------------- // // allocmst.cc - Do multisets support custom allocators? // // History: // 11-Feb-2000 WEB Initial draft, based on allocset.cc // 21-Feb-2000 WEB Correct namespace // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" #include // grab our naive custom allocator: #include "Naive.hh" template< class T > struct FunnyCompare { bool operator()( T x, T y ) { return x*x < y*y; } }; // FunnyCompare int main() { std::STL_MULTISET_COMP_ALLOC( int, FunnyCompare, NaiveAllocator ) s; s.insert(0); return *(s.begin()); } // main()