c++ - Preferred way to write custom iterators in C++17 -
this question has answer here:
- specializing iterator_traits 4 answers
- preparation std::iterator being deprecated 2 answers
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
Post a Comment