// ----------------------------------------------------------------------
//
// allocmap.cc - Do maps support custom allocators?
//
// History:
//   11-Feb-2000  WEB  Initial draft, based on allocdeq.cc and compmap.cc
//   21-Feb-2000  WEB  Correct namespace
//   04-Feb-2001  WEB  Remove macro in favor of compliant code
//   28-Feb-2001  WEB  Reinstate macro
//   25-Apr-2001  WEB  s/<ISOcxxSyntax.hh>/"ISOcxx\/ISOcxxSyntax.hh"/
//
// ----------------------------------------------------------------------


#include "ISOcxx/ISOcxxSyntax.hh"
#include <map>
#include <utility>


// 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()  {

  typedef  NaiveAllocator< std::pair<const int,double> >  NA;
  std::STL_MAP_COMP_ALLOC( int, double, FunnyCompare<int>, NA )  m;
  m[0] = 0.0;

  return  m.begin()->first;

}  // main()
