why are virtual base non-default constructors not called unless most-derived base explicitly invokes them?
问题 I would like to understand WHY C++ standard mandates that virtual base non-default constructors cannot be invoked by an intermediate NOT most-derived class, as in this code, when compiled with '-D_WITH_BUG_' : /* A virtual base's non-default constructor is NOT called UNLESS * the MOST DERIVED class explicitly invokes it */ #include <type_traits> #include <string> #include <iostream> class A { public: int _a; A(): _a(1) { std::cerr << "A() - me: " << ((void*)this) << std::endl; } A(int a): _a