Boost logo

Boost :

Subject: Re: [boost] [local_function] any interest in a LocalFunction library?
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-08-22 22:15:03

On Sun, Aug 22, 2010 at 7:27 PM, Jeffrey Lee Hellrung, Jr.
<jhellrung_at_[hidden]> wrote:
> On 8/22/2010 6:01 PM, OvermindDL1 wrote:
>> On Sun, Aug 22, 2010 at 11:18 AM, Mathieu -<ptr.jetable_at_[hidden]>  wrote:
>>> I might be totally wrong here but I don't see how it's different from
>>> lambdas...
>> What can it do differently from boost::phoenix?  I am guessing you
>> just create and instance a struct right there, but boost::phoenix
>> would be more succinct.
> Except Boost.Phoenix isn't as expressive as "real" C++, is it?  E.g., local
> variables are somewhat clumsy (opinion) in the current incarnation of
> Boost.Phoenix.
> Also, it seems reasonable to implement BOOST_LOCAL_FUNCTION in terms of
> lambdas if they exist, but perhaps one would want to use local functions on
> non-lambda-enabled compilers.

True, local variable do require a unique construct, but that construct
takes even less space then declaring multiple variables anyway (since
essentially all variables in phoenix can be treated as 'auto').

And boost::phoenix does not use C++1x functionality, so it works on
C98 compilers just fine, no C++ lambda's

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