"structure has default inheritance by default" means that this
struct Derived : Base {};
equivalently
struct Derived : public Base {};
Classes have private default inheritance, so when you remove public
from class inheritance, you have the equivalent
class Derived : private Base {};
In this private inheritance scenario, Derived
has no is-a relationship with Base
, it essentially has-a Base
. So, the conversion you are trying to do here:
cc = ⅆ
is not allowed.
source share