Loading...
Searching...
No Matches
nonstd::optional_lite::optional< T > Class Template Reference

class optional More...

`#include <optional.hpp>`

## Public Types

typedef T | value_type

## Public Member Functions

optional_constexpr | optional () optional_noexcept
optional_constexpr | optional (nullopt_t) optional_noexcept
optional_constexpr14 | optional (optional const &other)
template<typename U >
| optional (optional< U > const &other)
| optional (value_type const &value)
| ~optional ()
optional & | operator= (nullopt_t) optional_noexcept
optional & | operator= (optional const &other)
template<typename U >
optional & | operator= (U const &value)
template<typename U >
optional & | operator= (optional< U > const &other)
void | swap (optional &other)
optional_constexpr value_type const * | operator-> () const
optional_constexpr14 value_type * | operator-> ()
optional_constexpr value_type const & | operator* () const optional_ref_qual
optional_constexpr14 value_type & | operator* () optional_ref_qual
optional_constexpr | operator safe_bool () const optional_noexcept
optional_constexpr bool | has_value () const optional_noexcept
optional_constexpr14 value_type const & | value () const optional_ref_qual
optional_constexpr14 value_type & | value () optional_ref_qual
template<typename U >
optional_constexpr value_type | value_or (U const &v) const
template<typename F >
optional_constexpr value_type | value_or_eval (F f) const
void | reset () optional_noexcept

## Private Member Functions

void | this_type_does_not_support_comparisons () const
template<typename V >
void | initialize (V const &value)

## Private Attributes

optional_static_assert((!std::is_same< typename std::remove_cv< T >::type, nullopt_t >::value), "T in optional<T> must not be of type 'nullopt_t'.") optional_static_assert((!std typedef void(optional::* | safe_bool )() const
bool | has_value_
detail::storage_t< value_type > | contained

## Detailed Description

template<typename T>
class nonstd::optional_lite::optional< T >

class optional

optional access error

optional

Definition at line 931 of file optional.hpp.

## Member Typedef Documentation

## value_type

template<typename T >

typedef T nonstd::optional_lite::optional< T >::value_type

Definition at line 948 of file optional.hpp.

## Constructor & Destructor Documentation

## optional() [1/5]

template<typename T >

optional_constexpr nonstd::optional_lite::optional< T >::optional | ( |  | ) |

inline

Definition at line 953 of file optional.hpp.

## optional() [2/5]

template<typename T >

optional_constexpr nonstd::optional_lite::optional< T >::optional | ( | nullopt_t |  | ) |

inline

Definition at line 960 of file optional.hpp.

## optional() [3/5]

template<typename T >

optional_constexpr14 nonstd::optional_lite::optional< T >::optional | ( | optional< T > const & | other | ) |

inline

Definition at line 974 of file optional.hpp.

## optional() [4/5]

template<typename T >
template<typename U >

nonstd::optional_lite::optional< T >::optional | ( | optional< U > const & | other | ) |

inline

Definition at line 1046 of file optional.hpp.

## optional() [5/5]

template<typename T >

nonstd::optional_lite::optional< T >::optional | ( | value_type const & | value | ) |

inline

Definition at line 1161 of file optional.hpp.

## ~optional()

template<typename T >

nonstd::optional_lite::optional< T >::~optional | ( |  | ) |

inline

Definition at line 1170 of file optional.hpp.

## Member Function Documentation

## has_value()

template<typename T >

optional_constexpr bool nonstd::optional_lite::optional< T >::has_value | ( |  | ) | const

inline

Definition at line 1421 of file optional.hpp.

## initialize()

template<typename T >
template<typename V >

void nonstd::optional_lite::optional< T >::initialize | ( | V const & | value | ) |

inline private

Definition at line 1545 of file optional.hpp.

## operator safe_bool()

template<typename T >

optional_constexpr nonstd::optional_lite::optional< T >::operator safe_bool | ( |  | ) | const

inline

Definition at line 1414 of file optional.hpp.

## operator*() [1/2]

template<typename T >

optional_constexpr value_type const & nonstd::optional_lite::optional< T >::operator* | ( |  | ) | const

inline

Definition at line 1382 of file optional.hpp.

## operator*() [2/2]

template<typename T >

optional_constexpr14 value_type & nonstd::optional_lite::optional< T >::operator* | ( |  | ) |

inline

Definition at line 1388 of file optional.hpp.

## operator->() [1/2]

template<typename T >

optional_constexpr14 value_type * nonstd::optional_lite::optional< T >::operator-> | ( |  | ) |

inline

Definition at line 1376 of file optional.hpp.

## operator->() [2/2]

template<typename T >

optional_constexpr value_type const * nonstd::optional_lite::optional< T >::operator-> | ( |  | ) | const

inline

Definition at line 1370 of file optional.hpp.

## operator=() [1/4]

template<typename T >

optional & nonstd::optional_lite::optional< T >::operator= | ( | nullopt_t |  | ) |

inline

Definition at line 1181 of file optional.hpp.

## operator=() [2/4]

template<typename T >

optional & nonstd::optional_lite::optional< T >::operator= | ( | optional< T > const & | other | ) |

inline

Definition at line 1202 of file optional.hpp.

## operator=() [3/4]

template<typename T >
template<typename U >

optional & nonstd::optional_lite::optional< T >::operator= | ( | optional< U > const & | other | ) |

inline

Definition at line 1290 of file optional.hpp.

## operator=() [4/4]

template<typename T >
template<typename U >

optional & nonstd::optional_lite::optional< T >::operator= | ( | U const & | value | ) |

inline

Definition at line 1257 of file optional.hpp.

## reset()

template<typename T >

void nonstd::optional_lite::optional< T >::reset | ( |  | ) |

inline

Definition at line 1531 of file optional.hpp.

## swap()

template<typename T >

void nonstd::optional_lite::optional< T >::swap | ( | optional< T > & | other | ) |

inline

Definition at line 1354 of file optional.hpp.

## this_type_does_not_support_comparisons()

template<typename T >

void nonstd::optional_lite::optional< T >::this_type_does_not_support_comparisons | ( |  | ) | const

inline private

Definition at line 1542 of file optional.hpp.

## value() [1/2]

template<typename T >

optional_constexpr14 value_type const & nonstd::optional_lite::optional< T >::value | ( |  | ) | const

inline

Definition at line 1427 of file optional.hpp.

## value() [2/2]

template<typename T >

optional_constexpr14 value_type & nonstd::optional_lite::optional< T >::value | ( |  | ) |

inline

Definition at line 1440 of file optional.hpp.

## value_or()

template<typename T >
template<typename U >

optional_constexpr value_type nonstd::optional_lite::optional< T >::value_or | ( | U const & | v | ) | const

inline

Definition at line 1489 of file optional.hpp.

## value_or_eval()

template<typename T >
template<typename F >

optional_constexpr value_type nonstd::optional_lite::optional< T >::value_or_eval | ( | F | f | ) | const

inline

Definition at line 1521 of file optional.hpp.

## Member Data Documentation

## contained

template<typename T >

detail::storage_t< value_type > nonstd::optional_lite::optional< T >::contained

private

Definition at line 1565 of file optional.hpp.

## has_value_

template<typename T >

bool nonstd::optional_lite::optional< T >::has_value_

private

Definition at line 1564 of file optional.hpp.

## safe_bool

template<typename T >

optional_static_assert((!std::is_same< typename std::remove_cv< T >::type, nullopt_t >::value), "T in optional<T> must not be of type 'nullopt_t'.") optional_static_assert((!std typedef void(optional::* nonstd::optional_lite::optional< T >::safe_bool) () const

private

Definition at line 945 of file optional.hpp.

The documentation for this class was generated from the following file:

- restinio/third_party/optional-lite/optional.hpp