static struct definition

bearophile bearophileHUGS at lycos.com
Mon Aug 27 11:53:22 PDT 2012


Andrej Mitrovic:

> Isn't this limited to just classes?

See the last section of this page:
http://dlang.org/struct.html

>Nested Structs: A nested struct is a struct that is declared 
>inside the scope of a function or a templated struct that has 
>aliases to local functions as a template argument. Nested 
>structs have member functions. It has access to the context of 
>its enclosing scope (via an added hidden field).<

Bye,
bearophile



More information about the Digitalmars-d-learn mailing list