Hi
I start learning boost.Today I tried to use boost::lambda but failed
to compile very simple example.
2 hours of googling gave nothing.
Can anybody help me?
using namespace boost::lambda;
typedef std::map<int,st d::string_ttype ;
type test;
test[0] = (_T("1"));
test[1] = (_T("2"));
test[2] = (_T("3"));
std::vector<std ::string_ttest_ vector;
std::for_each(t est.begin(),tes t.end(),
test_vector.pus h_back(bind(&ty pe::value_type: :second,_1))
);
---------------------------------------------------------------------------------
: error C2664: 'std::vector<_T y>::push_back' : cannot convert
parameter 1 from 'const boost::lambda:: lambda_functor< T>' to 'const
std::string_t &'
I start learning boost.Today I tried to use boost::lambda but failed
to compile very simple example.
2 hours of googling gave nothing.
Can anybody help me?
using namespace boost::lambda;
typedef std::map<int,st d::string_ttype ;
type test;
test[0] = (_T("1"));
test[1] = (_T("2"));
test[2] = (_T("3"));
std::vector<std ::string_ttest_ vector;
std::for_each(t est.begin(),tes t.end(),
test_vector.pus h_back(bind(&ty pe::value_type: :second,_1))
);
---------------------------------------------------------------------------------
: error C2664: 'std::vector<_T y>::push_back' : cannot convert
parameter 1 from 'const boost::lambda:: lambda_functor< T>' to 'const
std::string_t &'
Comment