|
C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
|
Thread-safe single-value cache. More...
#include <helpers.hpp>

Public Member Functions | |
| OnceCache ()=default | |
| OnceCache (const OnceCache &other) | |
| OnceCache (OnceCache &&other) | |
| OnceCache & | operator= (const OnceCache &other) |
| OnceCache & | operator= (OnceCache &&other) |
| OnceCache & | operator= (const T &value) |
| OnceCache & | operator= (T &&value) |
| template<class F> | |
| void | call_once (F &&f) const |
| template<class... Args> | |
| T & | emplace (Args &&... args) const |
| bool | has_value () const noexcept |
| operator bool () const noexcept | |
| T & | value () |
| const T & | value () const |
| T & | operator* () |
| const T & | operator* () const |
| T * | operator-> () |
| const T * | operator-> () const |
| void | reset () const |
Thread-safe single-value cache.
| T | Value type stored in the cache |
Stores one optional value together with a std::once_flag. Use call_once() to guard lazy initialization when multiple threads may read the same object. Copying or moving a cache copies or moves the stored value, if any, and creates a fresh once flag.
Definition at line 512 of file helpers.hpp.
|
default |
|
inline |
Definition at line 516 of file helpers.hpp.
|
inline |
Definition at line 520 of file helpers.hpp.
|
inline |
Definition at line 551 of file helpers.hpp.
|
inline |
Definition at line 556 of file helpers.hpp.
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inline |
Definition at line 568 of file helpers.hpp.
|
inline |
Definition at line 570 of file helpers.hpp.
|
inline |
Definition at line 572 of file helpers.hpp.
|
inline |
Definition at line 574 of file helpers.hpp.
|
inline |
Definition at line 524 of file helpers.hpp.
|
inline |
Definition at line 540 of file helpers.hpp.
|
inline |
Definition at line 532 of file helpers.hpp.
|
inline |
Definition at line 545 of file helpers.hpp.
|
inline |
Definition at line 576 of file helpers.hpp.
|
inline |
Definition at line 564 of file helpers.hpp.
|
inline |
Definition at line 566 of file helpers.hpp.