Boost logo

Boost Users :

Subject: Re: [Boost-users] Annoying coding
From: Maxim Koshelev (chuchelo_at_[hidden])
Date: 2009-01-20 10:52:02


> This one IS tested!
...
yes, this worked, but next, more simple example not work:

std::map <int, std::string> m;
std::vector <int> v;

std::transform( m.begin(), m.end(), std::backinserter(v),
bind(&std::pair<const int, std::string>::second, _1) );

even replacing 'bind' by _1 ->* &std::pair<const
int,std::string>::second doesn't work.
GCC 4.1.2 reports:
error: reference to '_1' is ambiguous
/usr/include/boost/lambda/core.hpp:69: error: candidates are: const
boost::lambda::placeholder1_type& boost::lambda::<unnamed>::_1
/usr/include/boost/bind/placeholders.hpp:30: error:
boost::arg<1><unnamed>::_1()
services.cc:56: error: reference to '_1' is ambiguous


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