Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-11-13 04:30:36


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<int,int> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net