![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
A lightweight wrapper around a pointer providing an optional-like API for references (not supported by std::optional<T&>). More...
#include <optional_ref.h>
Public Member Functions | |
| optional_ref () noexcept=default | |
| optional_ref (std::nullopt_t) noexcept | |
| optional_ref (T &ref) noexcept | |
| optional_ref (T &&)=delete | |
| operator bool () const noexcept | |
| bool | has_value () const noexcept |
| T & | value () const |
| T & | operator* () const |
| T * | operator-> () const noexcept |
Private Attributes | |
| T * | _ptr_ = nullptr |
A lightweight wrapper around a pointer providing an optional-like API for references (not supported by std::optional<T&>).
| T | The referenced type. |
Definition at line 62 of file optional_ref.h.
|
defaultnoexcept |
References optional_ref().
Referenced by optional_ref(), optional_ref(), and operator bool().
|
noexcept |
Definition at line 51 of file optional_ref_tpl.h.
|
noexcept |
Definition at line 54 of file optional_ref_tpl.h.
References _ptr_.
|
delete |
|
noexcept |
Definition at line 62 of file optional_ref_tpl.h.
References _ptr_.
Referenced by optional_ref().
|
explicitnoexcept |
Definition at line 57 of file optional_ref_tpl.h.
References optional_ref(), and _ptr_.
| T & gum::optional_ref< T >::operator* | ( | ) | const |
Definition at line 73 of file optional_ref_tpl.h.
References value().
|
noexcept |
| T & gum::optional_ref< T >::value | ( | ) | const |
Definition at line 67 of file optional_ref_tpl.h.
References _ptr_.
Referenced by optional_ref(), and operator*().
|
private |
Definition at line 63 of file optional_ref.h.
Referenced by optional_ref(), has_value(), operator bool(), operator->(), and value().