[Issue 4087] Static Node struct of std.range.SListRange

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 26 17:38:27 PST 2015


https://issues.dlang.org/show_bug.cgi?id=4087

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |schveiguy at yahoo.com
         Resolution|---                         |INVALID

--- Comment #4 from Steven Schveighoffer <schveiguy at yahoo.com> ---
All structs inside other structs are static. From the description "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."

Note that applying static ONLY will prevent a context pointer for the struct
that is declared in a function scope, not a struct with a local function alias
(for which I actually think we should put an example on the page, I don't know
exactly what this means).

There is no need to apply static to the inner struct. There is no intention for
this to mean, now or in the future, that the struct has a hidden reference
pointer to its outer struct. That feature only happens for classes.

--


More information about the Digitalmars-d-bugs mailing list