![]() |
SDK
2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
|
Class template Optional manages an optional contained value - i.e., a value that is either present or absent. More...
#include <Optional.h>
Classes | |
class | BadAccess |
Thrown by value() method when accessing an object that does not contain a value. More... | |
Public Member Functions | |
Optional ()=default | |
Creates an empty Optional, i.e., no value present. | |
Optional (const T &value) | |
Copy value ctor. | |
Optional (T &&value) noexcept(std::is_nothrow_move_constructible< T >::value) | |
Move value ctor. | |
Optional (const Optional &rh) | |
Copy ctor. | |
Optional (Optional &&rh) noexcept(std::is_nothrow_move_constructible< T >::value) | |
Move ctor. | |
Optional & | operator= (const Optional &rh) |
Copy assignment operator. | |
Optional & | operator= (Optional &&rh) noexcept |
Move assignment operator. | |
T & | value () |
Value access non-const method. | |
T & | operator* () |
T * | operator-> () |
const T & | value () const |
Value access const method. | |
const T & | operator* () const |
const T * | operator-> () const |
bool | hasValue () const noexcept |
Checks whether a value is present. | |
operator bool () const noexcept | |
Checks whether a value is present. More... | |
void | reset () |
Invalidates possible contained value. The contained value will be destructed. | |
void | swap (Optional &other) noexcept |
Swaps the contents with those of other. | |
template<typename... ArgTs> | |
void | emplace (ArgTs &&... args) |
Constructs the contained value in-place. If *this already contains a value before the call, the contained value is destroyed by calling its destructor. | |
Class template Optional manages an optional contained value - i.e., a value that is either present or absent.
T | Type of the contained value |
|
inlineexplicitnoexcept |
Checks whether a value is present.