lumiera_documentation/research/clang-static-init.hpp
Ichthyostega 72bd94e141 bughunt: replace the ConfigResolver with a direct instantiation of Singleton -> MISS
thus not lib::Singleton is the culprit, it must be lib::SingletonSubclass
2013-10-06 23:17:18 +02:00

45 lines
575 B
C++

#include "lib/error.hpp"
#include "lib/singleton-subclass.hpp"
namespace test {
template<typename T>
struct Holder
{
static T* instance;
T&
get()
{
if (!instance)
{
instance = new T();
}
return *instance;
}
};
template<typename T>
T* Holder<T>::instance;
struct Subject
{
static int cnt;
Subject();
};
typedef lib::Singleton<Subject> Factory;
Subject& fabricate();
} // namespace test