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