Skip to content

Class Ase::Persistent

template <class Class>

ClassList > Ase > Persistent

More...

  • #include <cxxaux.hh>

Public Functions

Type Name
constexpr Persistent () noexcept
A constexpr constructor avoids the static initialization order fiasco.
operator bool () const
Check if this stores aClass 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.

Detailed Description

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.

Public Functions Documentation

function Persistent

inline constexpr Ase::Persistent::Persistent () noexcept

function operator bool

inline explicit Ase::Persistent::operator bool () const

function operator*

inline Class & Ase::Persistent::operator* () 

function operator->

inline Class * Ase::Persistent::operator-> () 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/cxxaux.hh