Second CT-Parameter of isRange Predicates
Nordlöw via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 2 06:16:51 PST 2015
Is there a reason why
isOutputRange(R,E)
takes a second argument `E` but not other range predicates
isInputRange(R)
isForwardRange(R)
...
?
If so, I still think it would very be nice to have a second
argument `E` for all the other `isXRange` traits to simplify, for
instance,
if (isInputRange!R && is(int == ElementType!R))
to simpler
if (isInputRange!(R, int))
or even
if (isInputRange!R && is(isSomeChar!(ElementType!R)))
to simpler
if (isInputRange!(R, isSomeChar))
?
What do think?
I'm planning to add a PR for this and simplify Phobos in all
places where this pattern is used.
More information about the Digitalmars-d
mailing list