1 // PR c++/54341 2 // { dg-do compile { target c++11 } } 3 4 template<typename T> 5 struct enable_shared_from_this 6 { 7 constexpr enable_shared_from_this(); // { dg-warning "used but never defined" } 8 9 private: 10 int mem; 11 }; 12 13 class VTableClass { 14 public: someVirtualMethod()15 virtual void someVirtualMethod() { } 16 }; 17 18 class SomeClass : public enable_shared_from_this< SomeClass >, public 19 VTableClass { }; 20 createInstance()21SomeClass* createInstance() 22 { 23 return new SomeClass; 24 } 25