#include "cxxaux.hh"
Public Member Functions | |
operator bool () const ASE_PURE | |
Class & | operator* () ASE_PURE |
Class * | operator-> () ASE_PURE |
constexpr | Persistent () noexcept |
Create an instance of `Class` on demand that is constructed and never destructed. Due to its constexpr ctor and on-demand creation of `Class`, a Persistent<> can be accessed at any time during the static ctor (or dtor) phases and will always yield a properly initialized `Class`.
|
constexprnoexcept |
A constexpr constructor avoids the static initialization order fiasco.
|
explicit |
Check if `this` stores a `Class` instance yet.
Class & operator* | ( | ) |
Retrieve reference to `Class` instance, always returns the same reference.
Class * operator-> | ( | ) |
Retrieve pointer to `Class` instance, always returns the same pointer.