#include <toast/singleton.hpp>
This won't compile if T has no default constructor. You'll need to use the toast::global_factory or toast::thread_specific_factory in that case. When using this factory toast::singleton_helper::set_factory will be disabled.
Static Public Member Functions | |
static typed_factory< T > | get () |