Boost logo

Boost :

Subject: Re: [boost] Rave for proposed Boost.Local (functions)
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-02-04 10:12:10


On 03/02/2011 16:45, Thomas Heller wrote:

>>> Now, let's consider another case, I want to do a.foo(b.bar()) + c.baz,
>>> but with a, b, and c taken from the scope, and I don't want to have to
>>> specify the types of a, b, and c. I can't do that in Phoenix without
>>> defining the foo, bar and baz functions at namespace scope, since they
>>> must have a template operator(), which is only allowed at that level. I
>>> can, however, do that with no problem with Boost.Local.
>>
>> Well, you have seen nothing yet ;-)
>
> http://svn.boost.org/svn/boost/sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/inside/extending_actors.html
> A boilerplate macro for that would be a very welcome contribution...

All of this still needs to happen at namespace scope.
The problem with declaring those things at namespace scope is that they
necessarily become far away from the lambda function you want to write.


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