FlattenedRanges

Flattens a list Values of ranges and non ranges.

If a type is a range then its ElementType is used.

Members

Aliases

FlattenedRanges
alias FlattenedRanges = FlattenedRanges!(ElementType!Head, FlattenedRanges!Tail)
Undocumented in source.
FlattenedRanges
alias FlattenedRanges = AliasSeq!(Head, FlattenedRanges!Tail)
Undocumented in source.
FlattenedRanges
alias FlattenedRanges = AliasSeq!()
Undocumented in source.
Head
alias Head = Values[0]
Undocumented in source.
Tail
alias Tail = Values[1..$]
Undocumented in source.

Examples

import std.algorithm : filter;
import std.meta : AliasSeq;

alias R1 = typeof([1, 2, 3].filter!"true");
alias R2 = typeof([1.0, 2.0, 3.0]);

static assert(is(FlattenedRanges!(int, double) == AliasSeq!(int, double)));
static assert(is(FlattenedRanges!(int, R1, R2) == AliasSeq!(int, int, double)));

import std.traits : CommonType;

static assert(is(CommonType!(FlattenedRanges!(int, R1, R2, float)) == double));

Meta