Making Your Own Container Compatible with C++20 Ranges
reedbeta.com
reedbeta.com
IMO, all systems languages should be expressive enough to implement their standard libraries and containers as normal language code, but sadly that isn't always the case.
~ Bjarne Stroustrup, How can you be so certain? (2019)
However I still dream of the day where static analysis can fix all possible security issues.
I've always used Boosts iterator_facade to do this: https://www.boost.org/doc/libs/1_75_0/libs/iterator/doc/iter... , which requires you only implement a maximum of 6 functions for any iterator type.
https://www.boost.org/doc/libs/1_75_0/doc/html/stl_interface...
I know, apples to oranges, the SFINAE bit was about concepts, not iterators. Still, pretty funny.