1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// Origin PR c++/48838 // { dg-do compile } class DUChainItemSystem { public: template<class T> void registerTypeClass(); static DUChainItemSystem& self(); }; template<class T> struct DUChainItemRegistrator { DUChainItemRegistrator() { DUChainItemSystem::self().registerTypeClass<T>(); } };