On March 21st the standards committee voted to approve the deprecation of std::iterator proposed in P0174:
The long sequence of void arguments is much less clear to the reader than simply providing the expected
typedefs in the class definition itself, which is the approach taken by the current working draft, following the pattern set in c++14
Before c++17 inheritance from std::iterator was encouraged to remove the tedium from iterator boilerplate implementation. But the deprecation will require one of these things:
- An iterator boilerplate will now need to include all required
typedefs - Algorithms working with iterators will now need to use
autorather than depending upon the iterator to declare types - Loki Astari has suggested that
std::iterator_traitsmay be updated to work without inheriting fromstd::iterator
Can someone enlighten me on which of these options I should expect, as I design custom iterators with an eye towards c++17 compatibility?