4 ms·
I wonder if the author intended to use private inheritance?
by butterisgood 4y ago
I wonder if the author intended to use private inheritance?
- deweywsu 4y ago[dead]
- nemetroid 4y agoStructs default to public inheritance. I don’t think the usage of struct here makes sense though, since there’s an invariant to uphold between the index and the ”std::vector<T> array” (sic).
- meragrin_ 4y agoNo. Straight from the comments: Private inheritance means you don’t get the base class interface as your own in the derived class. It is not an “is a” relation. It’s more of a “has a” relation.