Boost logo

Boost Users :

From: Darren Garvey (lists.drrngrvy_at_[hidden])
Date: 2007-03-14 09:43:39


On 14/03/07, Dmitriy Chumack <saint.d.a_at_[hidden]> wrote:
>
> hi *
>
> In the documentation for lambda library from boost_1_33_1, in section
> "Getting Started"->"Conventions used in this document" said that in
> all examples implicitly used such declarations:
>
> using namespace std;
> using namespace boost::lambda;
>
> So the following will work:
>
> for_each(a.begin(), a.end(), std::cout << _1 << ' ');
>
> But how do I have to rewrite the above line of code to have it
> compiled without "using namespace boost::lambda;" before it?
>
> Thanks in advance.

This isn't really a boost question, but:
boost::lambda::for_each(a.begin, a.end(), std::cout<< _1 << '');
should work.



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