struct Foo(T_) { alias T = T_; } void main() { Foo!int f; static assert(is(f.T == int)); }A little of syntax sugar could do the same, avoiding the need for a new name as "T_":
struct Foo(public T) {} Do you like? Bye, bearophile
struct Foo(T_) { alias T = T_; } void main() { Foo!int f; static assert(is(f.T == int)); }A little of syntax sugar could do the same, avoiding the need for a new name as "T_":
struct Foo(public T) {} Do you like? Bye, bearophile