singleton: add a public query for validity
This commit is contained in:
parent
46d19464b5
commit
44509498b7
@ -27,6 +27,13 @@ namespace cruft {
|
|||||||
static SelfT *instance;
|
static SelfT *instance;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static bool
|
||||||
|
valid (void) noexcept
|
||||||
|
{
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// instantiates the one blessed value of this type.
|
/// instantiates the one blessed value of this type.
|
||||||
///
|
///
|
||||||
/// `instantiate` must be called once and once only before any calls
|
/// `instantiate` must be called once and once only before any calls
|
||||||
|
Loading…
Reference in New Issue
Block a user