Process a TypeTuple
Justin Whear via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 15 08:22:52 PDT 2015
On Mon, 15 Jun 2015 04:06:12 +0000, Baz wrote:
> On Monday, 15 June 2015 at 03:53:35 UTC, Yuxuan Shui wrote:
>> Is it possible to apply some operation on every member of a TypeTuple,
>> then get the result back?
>>
>> Say I have a TypeTuple of array types, and I want a TypeTuple of their
>> element types, how could I do that?
For this particular example you use std.range.ElementType:
import std.typecons, std.range;
alias Elements = staticMap!(ElementType, MyRangeOrArrayTypes);
More information about the Digitalmars-d-learn
mailing list