Stop inheriting from std::iterator
std::iterator was deprecated in C++17 and after upgrading libc++, the
compiler warns about the many uses of it in ART.
p0174r1 gives a couple of reasons for its deprecation:
"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, ...
"In addition to the reduced clarity, the iterator template also lays a
trap for the unwary, as in typical usage it will be a dependent base
class, which means it will not be looking into during name lookup from
within the class or its member functions."
The first reason is illustrated by the comments in
BitTable::const_iterator. The second reason is illustrated by the
various "using foo = typename std::iterator<...>::foo" declarations.
Follow p0174r1's advice and simply provide the 5 typedefs in each
iterator class.
Bug: b/175635923
Test: treehugger
Change-Id: I2fba5af68eb05fd0a8ba5e2add0c8b8ed1ebee1a
12 files changed