Template Class FriendSingleton
Defined in File singleton.h
Class Documentation
-
template<class Type>
class FriendSingleton CE::State::FriendSingleton (Compile Time Unsafe) For true singleton creation.
i.e. instantiation is private/protected Type must friend CE::State::FriendSingleton<Type> so construction is accessible in this template’s context. Deletion by std::unique_ptr still requires an accessible destructor. The initialization, publication, retry, borrowed-lifetime, and operation contracts are the same as CE::State::Singleton.
Example usage: class Foo : public CE::State::FriendSingleton<Foo> { friend class CE::State::FriendSingleton<Foo>; Foo() = default; // private constructor, can’t be instantiated public: // interface };
Public Static Functions
Protected Functions
-
FriendSingleton() = default
-
FriendSingleton() = default