
13 Nov
2007
13 Nov
'07
9:30 a.m.
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