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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -