News for hackers. Stuff that matters.
Re:Writing a custom iterator in modern C++ by cma on Monday December 21, 2020 @07:17PM (#25501419)
I thought he was saying the `end` in range begin/end was now allowed to be some empty signifier to tell things to look for the null pointer (null is a sentinel, but `end` itself is now empty). That may not be right, I don't know enough about the new concepts stuff and range seems to be part of that.

edit: looking at this it maybe covers it:

https://foonathan.net/2020/03/iterator-sentinel/

Re:Writing a custom iterator in modern C++ by mehrdadn on Monday December 21, 2020 @07:28PM (#25501505)
Yes but I'm saying this is kind of moot when you're writing a struct that needs to store the iterators, because it can't get away with just storing the 'begin' -- you can't guarantee the second iterator you're storing will actually be the end. Meaning this iteration model isn't efficiently composable.