Accessing a field of a containing class from within a nested class
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Apr 1 12:43:02 PDT 2015
On Wednesday, 1 April 2015 at 18:26:49 UTC, Charles Hixson wrote:
> Perhaps BTree needs to be a class? I made it a struct because
> I want it to definitely close properly when it
> goes out of scope.
Maybe `scoped` can help:
http://dlang.org/phobos/std_typecons.html#.scoped
More information about the Digitalmars-d-learn
mailing list