DIP54 : revamp of Phobos tuple types
ilya-stromberg
ilya-stromberg-2009 at yandex.ru
Mon Dec 23 04:03:02 PST 2013
On Monday, 23 December 2013 at 11:44:01 UTC, Dicebot wrote:
> On Monday, 23 December 2013 at 10:15:19 UTC, ilya-stromberg
> wrote:
>> About `auto-expansion` problem: please add documentation that
>> describes difference between `auto-expansion TypeTuple` and
>> `TemplateArgumentList without auto-expansion`. I personally
>> don't
>> know any difference, probably because I didn't write too
>> complicated meta code.
>
> Added, does this help:
> http://wiki.dlang.org/DIP54#Auto-expansion_explained ?
Oh, I see. Thank you for the example. It really looks like
`TemplateArgumentList without auto-expansion` is more generic
solution.
Please, add similar example to the Phobos documentation (for
example, to the `http://dlang.org/tuple`) when you will implement
this DIP.
>
>> Also, can we keep bouth `auto-expansion TypeTuple` and
>> `TemplateArgumentList whitout auto-expansion` (maybe, in a
>> different module)?
>
> Technically - yes. But I think it will cause more damage that
> help.
>
>> Or, maybe, can we add documentation how to
>> convert any `auto-expansion TypeTuple` to the
>> `TemplateArgumentList without auto-expansion`.
>
> Like this?
>
> alias Packed = TemplateArgumentList!(T); // assuming T is
> variadic template argument list, T...
> alias Expanded = Packed.expand;
Yes, exactly.
Can we add alias for `auto-expansion TypeTuple` and add link to
the previous documentation like this:
alias ExpandedTemplateArgumentList(T) =
TemplateArgumentList!(T).expand;
It looks like it can fix all objections here.
More information about the Digitalmars-d
mailing list