I think this answer perfectly answers your question.
It is impossible to inherit from std::vector , it just probably will be very limited (due to the lack of a virtual destructor), rather confusing for others and expanding in composition, in any case it will be better / easier / more maintainable than inheritance.
Perhaps Stroustrup simply wanted to show it doable, but it does not have to mean that he offers it.
source share