I'm trying to use boost::ptr_map<> and cannot get calls insert to compile.
I'm on Mac OS X using gcc 3.3 with Xcode.
Even the most basic code fails to compile:
boost::ptr_map< in, int* > my_map;
int * val = new int( 22 );
my_map.insert( 1, val );
This fails with:
error: no matching function for call to `boost::ptr_map > >::insert(int, int*&)'
error: candidates are: std::pair::iterator, bool> boost::ptr_map_adapter::insert(typename boos
t::ptr_container_detail::ptr_map_adapter_base::key_type&, typename
boost::ptr_container_detail::ptr_map_adapter_base::value_type) [with T = int*, VoidPtrMap = std::map > >,
CloneAllocator = boost::heap_clone_allocator]
This looks like it's recommending the function that should be working.
I've been poking at this for quite a while and cannot find a clue why
this is not working.
Thank you for the help,
...Duane
...Duane