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 }));
... is the current implementation in Phobos. But I can't seem to understand this syntax. What is (inout int = 0)? Why can a block follow it?
My guess is that this is declaring some sort of function and testing if it is syntactically valid, but this is still strange to me.