Inheritance on cpp.com

Hi guys I'm trying to figure out which classes inherit from other classes

http://www.cplusplus.com/reference/iterator/RandomAccessIterator/

using the diagram above I can't tell if Input inherits from Forward which inherits from bi-directional which inherits from random access

or if its the other way around

if random access inherits from bi-directional which inherits from Forward which inherits from input?

thanks

The iterator categories are not real types. They are just a set of criteria that the iterators must fulfill in order be classified as a particular type of iterator.

The way you should read it is that input iterators has the least requirements. Forward iterators has all the requirements that input iterators has plus some more. Bidirectional iterators has all the requirements of forward iterators plus some more. And so on ...

I think this page has a good overview of the different iterator categories: http://en.cppreference.com/w/cpp/iterator
Last edited on
Topic archived. No new replies allowed.