scope guards

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 5 03:50:11 PDT 2014


On Tuesday, 5 August 2014 at 10:39:01 UTC, Manu via Digitalmars-d 
wrote:
> 'scope' class destruction is deterministic though right?
>
> http://dlang.org/statement.html : there are examples of stuff 
> like this:
>
> scope Foo f = new Foo();

scope classes are not supported anymore and considered D1 legacy 
;) Though not officially deprecated I doubt anyone actually pays 
attention if those are even working.

Official replacement is 
http://dlang.org/phobos/std_typecons.html#.scoped

Many of dlang.org documentation pages that are not generated from 
actual code are outdated in that regard.


More information about the Digitalmars-d mailing list