
On Tue, Jan 20, 2009 at 3:52 PM, Maxim Koshelev
This one IS tested! ... yes, this worked, but next, more simple example not work:
std::map
m; std::vector <int> v; std::transform( m.begin(), m.end(), std::backinserter(v), bind(&std::pair
::second, _1) ); even replacing 'bind' by _1 ->* &std::pair
::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 _______________________________________________
This works for me...
#include "boost/lambda/lambda.hpp"
#include "boost/lambda/bind.hpp"
#include <vector>
#include <map>
#include <algorithm>
#include <iterator>
#include <iostream>
int main( )
{
using namespace boost::lambda;
std::map