Boost logo

Boost Users :

From: Robert Jones (robertgbjones_at_[hidden])
Date: 2008-07-23 05:57:42


On Wed, Jul 23, 2008 at 7:14 AM, Sun, Xiuxin <xiuxin.sun_at_[hidden]> wrote:

>
> Still get same errors even after comment out following lines that the
> possibility of _1 error could be excluded.
>
> -------------
> #include <boost/lambda/lambda.hpp>
> #include <iostream>
> #include <iterator>
> #include <algorithm>
>
> int main()
> {
> using namespace boost::lambda;
> // typedef std::istream_iterator<int> in;
>
> // std::for_each(
> // in(std::cin), in(), std::cout << (_1 * 3) << " " );
> }
> ---------------
> thanks,
> sun
>
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Bruce Trask
> Sent: Wednesday, July 23, 2008 1:33 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] please help : Error: Unexpected type name
>
> > it's already in the code .
>
> Understood. I am advocating that you fully qualify the _1 at the call
> site as you might be running afoul of a clash with some other _1s.
>
> Sun, Xiuxin wrote:
> > HI Bruce ,
> > it's already in the code .
> > > using namespace boost::lambda;
> >> typedef std::istream_iterator<int> in;
> >>
> >> std::for_each(
> >> in(std::cin), in(), std::cout << (_1 * 3) << " " ); }
> >
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

Can I just be absolutely clear here - Do you mean that compiling this code:-

#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>

int main()
{
   using namespace boost::lambda;
}

Gives you compile errors?

Rob.



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