On Sunday, 23 March 2014 at 00:50:34 UTC, Walter Bright wrote:
        auto e = r.front;

Remember that front is a getter property, which means it should work like a variable. Typically, reading a variable is not destructive and needs no preparation. There's exceptions to the rule, but they almost always work this way, so ranges should too.

If true, this means that r.front will have to cache a copy in many cases.

Indeed, in many of my quick input ranges, I just make front a regular variable and popFront updates it to the next item.

Reply via email to