Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
#include "cxxaux.hh"
Public Member Functions | |
constexpr | Persistent () noexcept |
A constexpr constructor avoids the static initialization order fiasco. | |
operator bool () const __attribute__((__pure__)) | |
Check if this stores a Class instance yet. | |
Class & | operator* () __attribute__((__pure__)) |
Retrieve reference to Class instance, always returns the same reference. | |
Class * | operator-> () __attribute__((__pure__)) |
Retrieve pointer to Class instance, always returns the same pointer. | |
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 |
|
explicit |
Class & Ase::Persistent< Class >::operator* | ( | ) |
Retrieve reference to Class
instance, always returns the same reference.
Definition at line 392 of file cxxaux.hh.
References Ase::Persistent< Class >::operator->().
Class * Ase::Persistent< Class >::operator-> | ( | ) |
Retrieve pointer to Class
instance, always returns the same pointer.
Definition at line 394 of file cxxaux.hh.
References ASE_UNLIKELY.
Referenced by Ase::Persistent< Class >::operator*().