Ranges.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 have different capabilities, 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
A range type dependent on