I noticed that most if not all containers now require their ::iterator
type to satisfy LegacySomethingIterator
instead of SomethingIterator
.
For example, std::vector<>::iterator
now requires:
iterator
LegacyRandomAccessIterator
This seems to be the same for most of the other containers, all requiring their iterators to go from SomethingIterator
to LegacySomethingIterator
.
There are also the "new" requirements that took the names of the old requirements, such as RandomAccessIterator
, why were these added? It seems to me that the new variants just shadow the legacy variants, no differences.
Why were new ones created in the first place, their requirements look the same to me. Why don't the new ones just replace the old requirements instead of right now having 2 different names for them (e.g. RandomAccessIterator
and LegacyRandomAccessIterator
)?