|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Wrapper around std::optional<std::reference_wrapper<T>> that provides a more convenient API. More...
#include <src/utils/types.h>
Public Member Functions | |
| OptionalRef (std::nullopt_t) | |
| OptionalRef (T &ref) | |
| T & | operator* () |
| Dereference the underlying value. | |
| const T & | operator* () const |
| const T * | operator-> () const |
| T * | operator-> () |
| operator bool () const | |
| bool | has_value () const |
| Check if a value is present. | |
| T & | value () |
| Get a reference to the underlying value. | |
Data Fields | |
| std::optional< std::reference_wrapper< T > > | ref_ |
Wrapper around std::optional<std::reference_wrapper<T>> that provides a more convenient API.
This class provides a convenient wrapper around std::optional<std::reference_wrapper<T>> that allows you to easily access the underlying value without having to check for the presence of a value first.
The operator*() and value() methods return a reference to the underlying value, and the has_value() method can be used to check if a value is present.
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::optional<std::reference_wrapper<T> > OptionalRef< T >::ref_ |