Boost logo

Boost :

Subject: Re: [boost] Review of Local Exits
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2011-11-20 04:36:13


Vicente J. Botet Escriba wrote:
> Le 19/11/11 23:08, Lorenzo Caminiti a écrit :
> >...
> >FYI, I can write pp code that transforms void, this_, etc into lambda
> >captures. For example:
> >
> >TO_CAPTURE(void) // expand to []
> >TO_CAPTURE(this_,&x) // expand to [this,&x]
> >TO_CAPTURE( (this_) (&x) ) // expand to [this,&x]
> >
> >This way SCOPE_EXIT(void) and SCOPE_EXIT( (this_) (&x) ) or even
> >SCOPE_EXIT(this_,&x) could support void and this_ while still working
> >on both C++03 and C++11...
> >
> >> - For the same reason, const bind& and bind& should be removed from
> >> the interface.
> >Well, if local exits are not merged with scope exits, local exits can
> >keep const bind&, bind&, this_, void, etc.
>
> ...
> Alex, could you explain why (a part form following the lambda
> capture), you don't want to accept these new bindings in ScopedExit?

Because binding syntax in Local is not compatible with ScopeExit
captures. If Lorenzo can add support for this_ and void extensions
(with emphasis on extensions), I'd be fine with this.

Alex


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