DIP54 : revamp of Phobos tuple types
ilya-stromberg
ilya-stromberg-2009 at yandex.ru
Mon Dec 23 05:37:41 PST 2013
On Monday, 23 December 2013 at 11:58:06 UTC, Dicebot wrote:
> Also having both types at the same time will cause difficulties
> with template algorithms currently present in std.typetuple -
> having some defined in terms of raw argument list and others in
> terms of packed TemplateArgumentList is just another learning
> curve damage.
OK, I convinced. It's definetly bad to have both `auto-expansion
TypeTuple` and `TemplateArgumentList without auto-expansion`
template algorithms.
So, I totally agree with this DIP, we need only
`TemplateArgumentList without auto-expansion`.
BTW, I was very surprised when I saw the code from
`std.typetuple.TypeTuple`:
alias TL = TypeTuple!(int, double);
alias Types = TypeTuple!(TL, char);
static assert(is(Types == TypeTuple!(int, double, char)));
It's definitely better to have `.expand` property:
alias Types = TypeTuple!(TL.expand, char);
More information about the Digitalmars-d
mailing list