Boost logo

Boost Users :

From: yinglcs2_at_[hidden]
Date: 2006-02-22 20:01:20


Thanks. I add the import and namespace, but I still
get the same arror:

../Utils.h: In function ‘void keySet(T&,
std::vector<int, std::allocator<int> >&)’:
../Utils.h:175: error: use of ‘_1’ is ambiguous
/usr/include/boost/lambda/core.hpp:69: error: first
declared as ‘const boost::lambda::placeholder1_type&
boost::lambda::<unnamed>::_1’ here

--- nitin motgi <nitin.motgi_at_[hidden]> wrote:

> >>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 mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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