auto line = range.front; range.popFront; // pop immediatelyThis 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.