|
Hyper API for C++ 0.0.23576
Hyper client library for C++ applications
|
Surrogate for C++17 std::optional
More...
#include <optional.hpp>
Public Types | |
| using | value_type = T |
| The value type. | |
Public Member Functions | |
| optional () noexcept=default | |
| Constructor. | |
| optional (const optional &other) | |
| Copy constructor. | |
| optional (optional &&other) | |
| Move constructor. | |
| template<typename U = value_type, typename = typename std::enable_if<!std::is_same<typename std::decay<U>::type, optional<T>>::value>::type> | |
| optional (U &&value) | |
| Constructor. | |
| optional & | operator= (const optional &other) |
| Copy assignment. | |
| optional & | operator= (optional &&other) |
| Move assignment. | |
| template<typename Other > | |
| bool | operator== (const optional< Other > &other) const noexcept |
| Comparison. | |
| template<typename Other > | |
| bool | operator!= (const optional< Other > &other) const noexcept |
| Comparison. | |
| ~optional () | |
| Destructor. | |
| bool | has_value () const noexcept |
Checks whether *this contains a value. | |
| operator bool () const noexcept | |
Checks whether *this contains a value. | |
| T & | value () & |
| Value access. | |
| const T & | value () const & |
| Value access. | |
| T && | value () && |
| Value access. | |
| const T && | value () const && |
| Value access. | |
| template<typename U > | |
| T | value_or (U &&default_value) const & |
| Value or default. | |
| template<typename U > | |
| T | value_or (U &&default_value) && |
| Value or default. | |
| T * | operator-> () noexcept |
| Value access. | |
| const T * | operator-> () const noexcept |
| Value access. | |
| const T & | operator* () const & |
| Value access. | |
| T & | operator* () & |
| Value access. | |
| const T && | operator* () const && |
| Value access. | |
| T && | operator* () && |
| Value access. | |
| void | reset () noexcept |
| Reset. | |
| void | swap (optional &other) |
| Swap. | |
| template<typename... Args> | |
| void | emplace (Args &&... args) |
| Emplace. | |
Surrogate for C++17 std::optional
Definition at line 40 of file optional.hpp.
| using hyperapi::optional< T >::value_type = T |
The value type.
Definition at line 50 of file optional.hpp.
|
inline |
Destructor.
Definition at line 84 of file optional.hpp.
|
inlinenoexcept |
Checks whether *this contains a value.
Definition at line 87 of file optional.hpp.
|
inlineexplicitnoexcept |
Checks whether *this contains a value.
Definition at line 89 of file optional.hpp.
|
inlinenoexcept |
Comparison.
Definition at line 81 of file optional.hpp.
|
inline |
Value access.
Definition at line 140 of file optional.hpp.
|
inline |
Value access.
Definition at line 144 of file optional.hpp.
|
inline |
Value access.
Definition at line 138 of file optional.hpp.
|
inline |
Value access.
Definition at line 142 of file optional.hpp.
|
inlinenoexcept |
Value access.
Definition at line 135 of file optional.hpp.
|
inlinenoexcept |
Value access.
Definition at line 133 of file optional.hpp.
|
inlinenoexcept |
Comparison.
Definition at line 76 of file optional.hpp.
|
inline |
Value access.
Definition at line 92 of file optional.hpp.
|
inline |
Value access.
Definition at line 106 of file optional.hpp.
|
inline |
Value access.
Definition at line 99 of file optional.hpp.
|
inline |
Value access.
Definition at line 113 of file optional.hpp.
|
inline |
Value or default.
Definition at line 128 of file optional.hpp.
|
inline |
Value or default.
Definition at line 122 of file optional.hpp.