scope(~this)

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 16 00:49:19 PDT 2017


On Wednesday, 15 March 2017 at 19:34:32 UTC, Ali Çehreli wrote:
> On 03/15/2017 03:23 AM, Basile B. wrote:
>
> > you can use a mixin template because
> > they can introduce destructors that are called automatically
> with the
> > aggregate destrcutor
>
> Wow! Is this specified anywhere or have you come across this by 
> chance? :)
>
> Ali

It's not specified. Found it while trying to understand the 
difference between __dtor and __xdtor. But this is clearly 
designed to work this way. Not really an hidden gem.


More information about the Digitalmars-d-learn mailing list