// MSVC Version: 18.00.40629 // Command line: cl ctors.cpp // Clang Version: 3.7.0 // Command line: clang++ ctors.cpp -std=c++11 struct A { A() = delete; A(const A&) = delete; A(A&&) = delete; template A(Ts... ts) { } }; struct B : public A { using A::A; }; int main() { A a1; // clang: disallowed msvc: disallowed (good) B b1; // clang: disallowed msvc: allowed (bad) A a2(1, 2, 3); // clang: allowed msvc: allowed (good) B b2(1, 2, 3); // clang: allowed msvc: disallowed (bad) return 0; } // Full compiler output: /* MSVC: test.cpp(18) : error C2280: 'A::A(void)' : attempting to reference a deleted function test.cpp(3) : see declaration of 'A::A' test.cpp(22) : error C2661: 'B::B' : no overloaded function takes 3 arguments * Clang: test.cpp:18:7: error: call to deleted constructor of 'A' A a1; // clang: disallowed msvc: disallowed (good) ^ test.cpp:3:5: note: 'A' has been explicitly marked deleted here A() = delete; ^ test.cpp:19:7: error: call to implicitly-deleted default constructor of 'B' B b1; // clang: disallowed msvc: allowed (bad) ^ test.cpp:11:12: note: default constructor of 'B' is implicitly deleted because base class 'A' has a deleted default constructor struct B : public A ^ test.cpp:3:5: note: 'A' has been explicitly marked deleted here A() = delete; ^ 2 errors generated. */