--- Comment #2 from Seb <> ---
And a stripped down version of std.typecons.Tuple:

> A better implementation would be to have the Tuple with named fields use the 
> Tuple with no named fields as its only member variable; then, "alias this" 
> needs to simply return a reference to that member.

This is already done:

struct Tuple
   Types expand; // e.g. AliasSeq!(int, int)

However, if `alias expand this` is used, this stops to work:

auto t1 = Tuple!(int, "x", string, "y")(1, "a");
void foo(Tuple!(int, string) t2) {}

foo.d(149): Error: function!(int, string) t2)
is not callable using argument types (Tuple!(int, "x", string, "y"))
foo.d(149):        cannot pass argument t1 of type Tuple!(int, "x", string,
"y") to parameter Tuple!(int, string) t2


Reply via email to