Tag: private-inheritance
-
Passing a pointer to a type that is privately inherited in some base class
18 I always assumed that private inheritance simply means that a type doesn’t tell the outside that it’s inheriting from some base class. However, it seems that there are more restrictions. Consider the following minimal example: struct MyInterface {}; struct MyImpl : private MyInterface {}; struct Inherited : public MyImpl { // Error: ‘MyInterface’ not…