Although the derivation list of a class may not include the same base class more than once, a class can inherit from the same base class more than once. It might inherit the same base indirectly from two of its own direct base classes, or it might inherit a particular class directly and indirectly through another of its base classes.
As an example, the IO library
ostream classes each inherit from a common abstract base class named
basic_ios. That class holds the stream’s buffer and manages the stream’s condition state. The class
iostream, which can both read and write to a stream, inherits directly from both
ostream. Because both types inherit from
iostream inherits that base class ...