On 3/27/2014 3:49 AM, "Marc Schütz" <[email protected]>" wrote:
I was originally going to do that, but then I took a closer look at the
documentation, which says ([1] in the documentation of `isInputRange()`):

"Calling r.front is allowed only if calling r.empty has, or would have, returned
false."

(And the same for `popFront()`.)

That is, the documentation more or less explicitly states that you don't
actually need to call `empty` if you know it returned `true`.

[1] http://dlang.org/phobos/std_range.html

Right, it does say that, and it is seriously wrong.

Reply via email to