Arbiter
Dependency manager library that supports decentralization
|
Represents a value which may or may not exist. More...
Public Types | |
using | Value = T |
Public Member Functions | |
constexpr | Optional () noexcept |
Creates an empty Optional. More... | |
Optional (const None &) noexcept | |
Creates an empty Optional. More... | |
Optional (const T &value) noexcept(std::is_nothrow_copy_constructible< T >::value) | |
Creates an Optional containing a copy of the given value. More... | |
Optional (T &&value) noexcept(std::is_nothrow_move_constructible< T >::value) | |
Creates an Optional containing the given value. More... | |
Optional (const Optional &other) noexcept(std::is_nothrow_copy_constructible< T >::value) | |
template<typename U > | |
Optional (const Optional< U > &other) noexcept(std::is_nothrow_constructible< T, const U &>::value) | |
Converts from another Optional containing a compatible type. More... | |
Optional (Optional &&other) noexcept(std::is_nothrow_move_constructible< T >::value) | |
template<typename U > | |
Optional (Optional< U > &&other) noexcept(std::is_nothrow_constructible< T, U &&>::value) | |
Converts from another Optional containing a compatible type. More... | |
~Optional () noexcept(std::is_nothrow_destructible< T >::value) | |
operator bool () const noexcept | |
Returns true if this Optional contains a value, or false if it is empty. More... | |
T & | operator* () noexcept |
const T & | operator* () const noexcept |
T * | operator-> () noexcept |
const T * | operator-> () const noexcept |
Optional & | operator= (const Optional &other) noexcept(std::is_nothrow_destructible< T >::value &&std::is_nothrow_copy_constructible< T >::value) |
Optional & | operator= (Optional &&other) noexcept(std::is_nothrow_destructible< T >::value &&std::is_nothrow_move_constructible< T >::value) |
T * | pointer () noexcept |
Returns a pointer to the value in the Optional, or nullptr if empty. More... | |
const T * | pointer () const noexcept |
Returns a pointer to the value in the Optional, or nullptr if empty. More... | |
T & | value () noexcept |
Accesses the value in the Optional. More... | |
const T & | value () const noexcept |
Accesses the value in the Optional. More... | |
Static Public Member Functions | |
static Optional | fromPointer (const T *pointer) noexcept(std::is_nothrow_copy_constructible< T >::value) |
Creates an Optional from a pointer which may or may not be null. More... | |
Represents a value which may or may not exist.
Definition at line 25 of file Optional.h.
using Arbiter::Optional< T >::Value = T |
Definition at line 28 of file Optional.h.
|
noexcept |
Creates an empty Optional.
Definition at line 33 of file Optional.h.
|
noexcept |
Creates an empty Optional.
Definition at line 40 of file Optional.h.
|
noexcept |
Creates an Optional containing a copy of the given value.
Definition at line 47 of file Optional.h.
|
noexcept |
Creates an Optional containing the given value.
Definition at line 56 of file Optional.h.
|
noexcept |
Definition at line 62 of file Optional.h.
|
noexcept |
Converts from another Optional containing a compatible type.
Definition at line 74 of file Optional.h.
|
noexcept |
Definition at line 97 of file Optional.h.
|
noexcept |
Converts from another Optional containing a compatible type.
Definition at line 109 of file Optional.h.
|
noexcept |
Definition at line 128 of file Optional.h.
|
staticnoexcept |
Creates an Optional from a pointer which may or may not be null.
Definition at line 136 of file Optional.h.
|
explicitnoexcept |
Returns true if this Optional contains a value, or false if it is empty.
Definition at line 148 of file Optional.h.
|
noexcept |
Definition at line 191 of file Optional.h.
|
noexcept |
Definition at line 196 of file Optional.h.
|
noexcept |
Definition at line 201 of file Optional.h.
|
noexcept |
Definition at line 206 of file Optional.h.
|
noexcept |
Definition at line 82 of file Optional.h.
|
noexcept |
Definition at line 117 of file Optional.h.
|
noexcept |
Returns a pointer to the value in the Optional, or nullptr
if empty.
Definition at line 178 of file Optional.h.
|
noexcept |
Returns a pointer to the value in the Optional, or nullptr
if empty.
Definition at line 186 of file Optional.h.
|
noexcept |
Accesses the value in the Optional.
The Optional must not be empty.
Definition at line 158 of file Optional.h.
|
noexcept |
Accesses the value in the Optional.
The Optional must not be empty.
Definition at line 169 of file Optional.h.