On Sat, 24 Sep 2011 17:33:37 -0400, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:

I've ran into a bit of an issue. isInputRange is defined like this:

template isInputRange(R)
{
    enum bool isInputRange = is(typeof(
    {
        R r;              // 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
    }()));
}

But this will fail for structs which have a disabled default ctor. Was
this planned?

I don't think this was planned.

I think this should fix it:

R r = R.init;

-Steve

Reply via email to