On Wednesday, 22 March 2017 at 14:06:56 UTC, Atila Neves wrote:
isInputRange looks like this:

template isInputRange(R)
{
    enum bool isInputRange = is(typeof(
    (inout int = 0)
    {
        R r = R.init;     // can define a range object
        if (r.empty) {}   // can test for empty
        r.popFront;       // can invoke popFront()
        auto h = r.front; // can get the front of the range
    }));
}

[...]

Got the same error when I changed it to:

enum isInputRange(R) = is(typeof({...}));

Which might explain why it's still inside an explicit template declaration. Or not, this whole thing is weird to me.

Atila

Reply via email to