...

/

More on Uses-cases for Concepts

More on Uses-cases for Concepts

Discover further use-cases of concepts in C++20.

Overloading

std::advance is an algorithm of the Standard Template Library. It increments a given iterator iter by n elements. Based on the capabilities of the given iterator, a different advanced strategy could be used. For example, a std::forward_list supports an iterator that can only advance in one direction, while a std::list supports a bidirectional iterator, and a std::vector supports a random access iterator. ...