27.04.2020 06:38, Jon Degenhardt пишет:

Is there a better way to write this?

--Jon

I don't know a better way, I think you enlist all possible ways - get a value using either `front` or special range member. I prefer the second variant, I don't think it is less consistent with range paradigms. Considering you need amount of consumed bytes only when range is empty the second way is more effective.

Reply via email to