I think the quote may be wrong. Below, for example, will not compile:
struct Base{ Base(int){} }; struct Derived : Base{ using Base::Base; }; int main() { Derived d;
Derived contains only inherited constructors, but it does not have a public default value! I told the public! Actually, the error message from gcc :
'Derived :: Derived ()' is implicitly deleted as the default definition will be poorly formed
So, what the author means is that if the Derived class inherits constructors from the Base class, a default constructor for Derived will be provided, because it may need to initialize the default Derived element, which cannot be initialized from inherited constructors, because they donโt even know about their existence.
Finally, in my example, the compiler implicitly removed the default ctor for Derived, because no one explicitly defined it. But if you add the default ctor to Base, a synthesized default ctor for Derived will be created.
source share