Boost logo

Boost Users :

From: nitin motgi (nitin.motgi_at_[hidden])
Date: 2006-02-22 19:23:34


>>template <class T>
>>void keySet(T& aMap, vector<int>& keySet) {
>> transform( aMap.begin(), aMap.end(),
>>back_inserter(keySet), bind(&T::value_type::first,
>>_1) );
>>
>>}
>>
>>
>>here is the error:
>>g++ -O0 -g3 -Wall -c -fmessage-length=0
>>-oBlockGrouper.o ../BlockGrouper.cpp
>>../Utils.h: In function 'void keySet(T&,
>>std::vector<int, std::allocator<int> >&)':
>>../Utils.h:149: error: '_1' was not declared in
>>this scope

Based on your errors it looks like
_1 is not declared in the scope.

Did you miss adding these:

#include <boost/lambda/lambda.hpp>
using boost::lambda::_1;

-- Nitin Motgi

>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

--
Nitin Motgi


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