I'm trying to write a Singleton base class similar to Ogre3Ds Ogre::Singleton using C++20's std::default_initializable.
#include <concepts>
template <std::default_initializable T>
struct Singleton {};
class Foo: public Singleton<Foo> {};
This code does not compile:
error C7602: 'Singleton': the associated constraints are not satisfied
Would I expect it to? If not: Why?
I'm using the latest MSVC with /std:c++latest.