c++ - Preferred way to write custom iterators in C++17 -


this question has answer here:

beginning c++17 inheriting std::iterator<...> deprecated. instead 1 should specialize std::iterator_traits<...> own iterator type.

i used write iterator class nested types in container classes belong to.

trying partial specialize std::iterator_traits<c<t>> leads non-deducible context value type t container c.

the question: should (as of c++17) define iterator classes outside container classes?


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -