Struct This
Special type used as a placeholder for U
within the definition of U
to
enable self-referential types.
struct This
;
Note that this is recognized only if used as the first argument to a template type.
Fields
Name | Type | Description |
---|---|---|
nothing
|
Void |
Example
union U {
TaggedUnion!This[] list;
int number;
string text;
}
alias Node = TaggedUnion!U;
auto n = Node([Node(12), Node("foo")]);
assert(n .isList);
assert(n .listValue == [Node(12), Node("foo")]);