On Tue, 22 Apr 2014 10:58:41 -0400, Andrej Mitrovic via
Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:
What does (inout int = 0) mean/affect here?
This was asked recently, see my reponse here:
http://forum.dlang.org/post/mailman.102.1396007039.25518.digitalmars-d-le...@puremagic.com
I think this can be fixed a different way:
template isInputRange(R)
{
enum bool isInputRange = is(typeof(
(R r)
{
R r2 = 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
}));
}
Note, is the r2 = R.init needed? Not sure.
-Steve