|
Boost : |
Subject: Re: [boost] [local_function] any interest in a LocalFunction library?
From: Pierre Morcello (pmorcell-cppfrance_at_[hidden])
Date: 2010-08-27 13:39:34
Lorenzo Caminiti wrote :
> I got a first version of Boost.LocalFunction implemented.
1/
Sorry, I think I just realized I told you something wrong earlier on the list. One year ago, interest was raised towards unnamed local fonction. I missed that you were aiming for named function. we did not discuss named local function.
As a consequence, I think it would be a great addition to your current work a version of the macro BOOST_LOCALFUNCTION macro that executes in place. It just needs a different macro name (ex: BOOST_IMMEDIATEFUNCTION), without the function name, without the function return type, and without the functor.
So basically a wrapper around :
{ BOOST_SCOPE_EXIT()
{
}
BOOST_SCOPE_EXIT_END();
}
which binds also the 'this', and constness like you did, should do the trick.
What do you think of this proposition?
2/ Is it possible to have look at your code?
3/ What is the generated code output by your example ?
4/ do you think your work could be use to allow Boost.ScopeExit to use your 'this' binding and constness techniques ?
Best,
Pierre Morcello
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk