Variadic grouping

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 30 10:12:19 PDT 2013


On 7/30/13 12:36 AM, Dicebot wrote:
> On Monday, 29 July 2013 at 14:53:10 UTC, monarch_dodra wrote:
>> A simple "Group" struct will solve the problem without a second thought:
>>
>> struct Group(Args...)
>> {
>> alias Ungroup = Args;
>> }
>
> That is actually a TypeTuple that does not auto-expand. May be even
> worth defining it as "alias Ungroup = TypeTuple!(Args)" to be more
> self-documenting at cost of some redundancy.
>
> Also it does not need to be a struct, templates are not mandatory
> eponymous.
>
> I think it is best solution for topic starter problem in terms of ROI
> and worth inclusion into Phobos.

Agreed.

Andrei


More information about the Digitalmars-d mailing list