Boost logo

Boost :

Subject: Re: [boost] outer class `this` in local classes
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2010-06-24 22:00:25

On Thu, Jun 24, 2010 at 1:11 PM, Edward Diener <eldiener_at_[hidden]> wrote:
> On 6/24/2010 1:06 PM, Lorenzo Caminiti wrote:
>> Hello all,
>> Is there a way to access the outer class `this` from a local class but
>> without using inheritance? snip...
> Shouldn't you be asking this in a C++ NG. It has nothing to do with a Boost
> library.

Well, I didn't mention it at all but I am dealing with this in trying
to implement constant-correct block invariants and loop variants for
Boost.Contract with mechanisms inspired by Boost.ScopeExit as
indicated by Alexander below. Therefore, the solution of this problem
_could_ be related to future Boost libraries...

To be honest, I am interested about what Boosters have to say about
this problem (because I received many enlightening suggestions
before). If you can indicate a couple of good C++ NG I will be happy
to pose the same question there. Thanks.

On Thu, Apr 15, 2010 at 7:02 PM, Alexander Nasonov <alnsn_at_[hidden]> wrote:
> 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
>    (BOOST_LOCAL_FUNCTION_BIND( (a)(&b) ), int c)) {
>    // ...
> 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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at