On Monday, 22 June 2020 at 21:27:12 UTC, Steven Schveighoffer wrote:
    auto line = range.front;
    range.popFront;  // pop immediately

This is a bad idea, once you popFront, the original front is possibly invalid (and technically is the case for byLine).

In this case, it's caused by underlying structure may reuse the `byLine` buffer, but I'm asking a more general question about range interface: why not provide an extra popAndReturnFront(), and the user to choose in the actual usage scenario.

Reply via email to