There is a subtle difference between
struct D : B { using B::B; D(const char* pc) {}
against
struct D : B { using B::B; };
In the second case, the compiler will automatically generate the default constructor D () {} ". But if you create your own constructor for D, then the default" D () {} "is no longer available. Of course, you inherited the default constructor B, but this does not tell the compiler how to build D by default.
dchhetri
source share