Boost logo

Boost :

Subject: Re: [boost] [phoenix] default constructable stateless lambdas
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-09-25 09:22:53


On 09/25/2012 04:52 AM, Eric Niebler wrote:
> On 9/24/2012 4:38 PM, Mathias Gaunard wrote:
>> On 09/24/2012 09:01 PM, Eric Niebler wrote:
>>> C++11 lambdas have the nice property that stateless ones are implicitly
>>> convertible to raw function pointers. This can be implemented for
>>> Phoenix if we can rely on the default-constructability of Phoenix lambda
>>> types. In my stackoverflow answer I show how. It'd be pretty cool if
>>> this were a standard part of all Phoenix lambdas. Is there interest?
>>
>> That probably requires that the function object be monomorphic too.
>
> It doesn't. See the implementation here:
>
> http://stackoverflow.com/questions/10144948/static-functions-from-boost-lambda-or-boost-phoenix/12326204#12326204

Oh, you're using a template conversion operator.

Very nice indeed.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk