This is gcc 58751 error "[C ++ 11] Inheritance of constructors does not work properly with virtual inheritance" (aka: 63339 "using constructors" from virtual databases is implicitly removed "):
From the description of 58751:
Document N2540 states that:
As a rule, inheritance of design definitions for classes with virtual databases will be poorly formed, unless the virtual database supports initialization by default, or the virtual database is a direct database and is called a redirected database. Similarly, all data members and other direct databases must support initialization by default, or any attempt to use the inheriting constructor will be poorly formed. Note: poorly formed when used, not announced.
Therefore, the case of virtual databases is clearly considered by the committee and, therefore, should be implemented.
Workaround borrowed from bug report:
struct base { base() = default;
According to the error report, in this case, the constructor base::base(int) is called by the implicitly created constructor derived::derived(int) .
I checked that your code is not compiling. But this does and calls the constructor base::base(int) .
source share