On Wed, Sep 17, 2014 at 12:10 PM, jahanian <[email protected]> wrote:
> > On Sep 16, 2014, at 5:44 PM, Reid Kleckner <[email protected]> wrote: > > > I mean, there's got to be a way to inject some destructor cleanups into > the lambda, like: > > > > struct A { ~A(); }; > > int f(A) { return 42; } > > id test_dict() > > { > > return @{ > > @"a": [x=f(A())]() { return x; }, > > @"b": [x=f(A())]() { return x; } > > }; > > } > > > > Does this change affect where ~A gets called? > > > > With John’s suggested patch I sent earlier, cleanup code to effect > conversion to block expression is moved to > where outer-most expression (one passed to return) is seen. So, new patch > does not affect where ~A > gets called. > Cool, sounds good to me.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
