Comment

Comment by nly

I'm not sure if this situation has improved in C++20, but writing iterator types properly in classic C++ really sucks, and this article glosses over a lot of the details.

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.

parent nly 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton