Boost logo

Boost :

Subject: Re: [boost] [contract] diff n1962
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2010-04-15 19:02:34


vicente.botet wrote:
> VBE> Boost.ScopeExit showed a technique that can be used to
> emulate local functions. Alexander proposed long time ago to provide
> it independently from ScopeExit but to my knowledge this has not
> been done.

Sorry for the late reply, I'm not following every boost thread, I got
this message via google alerts.

Yes, this has not been done. Local function can borrow argument
binding syntax from ScopeExit but there are other things I need to think
of. For instance, in

int BOOST_LOCAL_FUNCTION(f,
    (BOOST_LOCAL_FUNCTION_BIND( (a)(&b) ), int c)) {
    // ...
} BOOST_LOCAL_FUNCTION_END

syntax, is there any way to shorten BOOST_LOCAL_FUNCTION_BIND to "bind"?

The syntax doesn't have to be exactly as above. If someone could
take a lead on this it would be great. I don't have time for this,
I'm afraid.

Alex


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