tuple slicing operator

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 9 19:31:54 PDT 2014


On Saturday, 9 August 2014 at 20:32:05 UTC, Vlad Levenfeld wrote:
> Are there any specific cases where they're not?

Not that I know of, and it doesn't really make sense for them not 
to be, but it could happen. If you want to be certain that 
slicing a type will produce a valid range, you can do it in a 
template constraint or a static if:

void test(T)(T someType)
if (isInputRange!(typeof(someType[])))
{
}



More information about the Digitalmars-d-learn mailing list