DIP1000: Scoped Pointers

Joseph Rushton Wakeling via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Aug 14 21:56:07 PDT 2016


On Sunday, 14 August 2016 at 10:11:25 UTC, Guillaume Chatelet 
wrote:
> Isn't it what a scoped class is supposed to provide?
>
> class Rnd {}
>
> void foo() {
>   scope rnd  = new Rnd; // reference semantic and stack 
> allocated
> }

Does that actually work in D2? I thought it was a D1-only thing.



More information about the Digitalmars-d-announce mailing list