On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei
Alexandrescu wrote:
template PackedAliasSeq!(T...)
{
alias expand = AliasSeq!T;
}
I started playing around with this a few days ago, and came up
with another interesting abstraction - NamedPack:
alias foo = NamedPack!("Type&
U[1], Merge!T.With!(U[2 .. $]));
}
}
So instead of the unworkable Merge!(AliasSeq!(...),
AliasSeq!(...)), one would write
Merge!(AliasSeq!(...)).With!(AliasSeq!(...)).
The problem remains for other use cases, so I was thinking of
adding to std.meta this simple artifact:
template PackedAliasSeq!(
to std.meta this simple artifact:
template PackedAliasSeq!(T...)
{
alias expand = AliasSeq!T;
}
That way, everything stays together and can be expanded on
demand.
Andrei
Isn't a packed AliasSeq just a tuple ?
It is not a tuple (in the `std.typecons.Tuple` sense) if it can
contain
U[1], Merge!T.With!(U[2 .. $]));
}
}
So instead of the unworkable Merge!(AliasSeq!(...),
AliasSeq!(...)), one would write
Merge!(AliasSeq!(...)).With!(AliasSeq!(...)).
The problem remains for other use cases, so I was thinking of
adding to std.meta this simple artifact:
template PackedAliasSeq!(
On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei
Alexandrescu wrote:
After coding https://github.com/dlang/phobos/pull/6192 with
AliasSeq, the experience has been quite pleasurable. However,
in places the AliasSeq tends to expand too eagerly, leading to
a need to "keep it together" e.g. wh
.), AliasSeq!(...)), one
would write Merge!(AliasSeq!(...)).With!(AliasSeq!(...)).
The problem remains for other use cases, so I was thinking of adding to
std.meta this simple artifact:
template PackedAliasSeq!(T...)
{
alias expand = AliasSeq!T;
}
That way, everything stays together and c