template <typename T>
class optional
Defined at line 27 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
optional holds an 'optional' contained value.
This is similar to C++17's std::optional.
Public Methods
void optional<T> ()
constructors
Defined at line 36 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
void optional<T> (const optional<T> & other)
Defined at line 82 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
void optional<T> (optional<T> && other)
Defined at line 85 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U>
void optional<T> (const optional<U> & other)
Defined at line 89 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U>
void optional<T> (optional<U> && other)
Defined at line 97 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U = value_type, typename = IsConvertibleToT<U>>
void optional<T> (U && value)
Defined at line 105 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
T & value ()
value() returns the contained value.
If the optional does not contain a value, then value() will assert.
Defined at line 109 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
const T & value ()
Defined at line 115 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
const T & value (const T & defaultValue)
value() returns the contained value, or defaultValue if the optional does
not contain a value.
Defined at line 121 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
bool operator bool ()
operator bool() returns true if the optional contains a value.
Defined at line 129 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
bool has_value ()
has_value() returns true if the optional contains a value.
Defined at line 134 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
optional<T> & operator= (const optional<T> & other)
assignment
Defined at line 139 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
optional<T> & operator= (optional<T> && other)
Defined at line 146 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U = T, typename = IsConvertibleToT<U>>
optional<T> & operator= (U && value)
Defined at line 153 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U>
optional<T> & operator= (const optional<U> & other)
Defined at line 161 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
template <typename U>
optional<T> & operator= (optional<U> && other)
Defined at line 169 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
const T * operator-> ()
value access
Defined at line 177 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
T * operator-> ()
Defined at line 183 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
const T & operator* ()
Defined at line 189 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h
T & operator* ()
Defined at line 195 of file ../../third_party/github.com/google/cppdap/src/include/dap/optional.h