Boost logo

Boost :

Subject: Re: [boost] phoenix::bind
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-29 12:11:48

Eric Niebler:

> Lambda and phoenix differ as to whether local variables are captured by
> value or by reference (phoenix always captures by value, lambda tries to
> guess what you intend based on usage).

Are you sure that

    int v[] = { 1, 2, 3 };
    std::for_each( v, v + 3, std::cout << arg1 << std::endl );

captures std::cout by value? :-)

Boost list run by bdawes at, gregod at, cpdaniel at, john at