alias of that range's type.
chooseAmong
fn
auto chooseAmong(Ranges...)(size_t index, return scope Ranges rs) if (Ranges.length >= 2
&& allSatisfy!(isInputRange, staticMap!(Unqual, Ranges))
&& !is(CommonType!(staticMap!(ElementType, Ranges)) == void))Choose one of multiple ranges at runtime.
The ranges may be different, but they must have compatible element types. The result is a range that offers the weakest capabilities of all Ranges.
Parameters
index | which range to choose, must be less than the number of ranges |
rs | two or more ranges |
Returns
The indexed range. If rs consists of only one range, the return type is an