[ptr_container] Using bind with ptr_map

Is there a way to use bind with ptr_map? The following fails to compile (but
does work with std::map):
typedef boost::ptr_map

Bill Buklis skrev:
Is there a way to use bind with ptr_map? The following fails to compile (but does work with std::map):
typedef boost::ptr_map
TESTMAP; boost::bind( &TESTMAP::value_type::first, _1 );
This errors with pointer to reference member is illegal (C2634 in VC++ 8).
The value_type is a proxy object which is not quite like std::pair in every way. I'm very busy right now, but I don't think there is any way to make the above work. In 1.35+, there is a chance that the underlying container is better exposed, so you can use that directly in some circumstances. -Thorsten
participants (2)
-
Bill Buklis
-
Thorsten Ottosen