optional File Reference

Go to the source code of this file.

## Classes

struct | std::experimental::fundamentals_v1::_Has_addressof< _Tp >
class | std::experimental::fundamentals_v1::_Optional_base< _Tp, _ShouldProvideDestructor >
class | std::experimental::fundamentals_v1::_Optional_base< _Tp, false >
class | std::experimental::fundamentals_v1::bad_optional_access
struct | std::experimental::fundamentals_v1::in_place_t
struct | std::experimental::fundamentals_v1::nullopt_t
class | std::experimental::fundamentals_v1::optional< _Tp >

## Namespaces

namespace | std

## Macros

#define | __cpp_lib_experimental_optional
#define | _GLIBCXX_EXPERIMENTAL_OPTIONAL

## Typedefs

template<typename _Tp , typename _Up >
using | std::experimental::__assigns_from_optional = __or_< is_assignable< _Tp &, const optional< _Up > & >, is_assignable< _Tp &, optional< _Up > & >, is_assignable< _Tp &, const optional< _Up > && >, is_assignable< _Tp &, optional< _Up > && > >
template<typename _Tp , typename _Up >

using

std::experimental::__converts_from_optional = __or_< is_constructible< _Tp, const optional< _Up > & >, is_constructible< _Tp, optional< _Up > & >, is_constructible< _Tp, const optional< _Up > && >, is_constructible< _Tp, optional< _Up > && >, is_convertible< const optional< _Up > &, _Tp >, is_convertible< optional< _Up > &, _Tp >, is_convertible< const optional< _Up > &&, _Tp >, is_convertible< optional< _Up > &&, _Tp > >

## Functions

template<typename _Tp >
constexpr enable_if_t<!_Has_addressof< _Tp >::value, _Tp * > | std::experimental::__constexpr_addressof (_Tp &__t)
template<typename _Tp >
enable_if_t< _Has_addressof< _Tp >::value, _Tp * > | std::experimental::__constexpr_addressof (_Tp &__t)
void | std::experimental::__throw_bad_optional_access (const char *) __attribute__((__noreturn__))
void | std::experimental::__throw_bad_optional_access (const char *__s)
template<typename _Tp >
constexpr optional< decay_t< _Tp > > | std::experimental::make_optional (_Tp &&__t)
template<typename _Tp >
constexpr bool | std::experimental::operator!= (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator!= (const optional< _Tp > &__lhs, _Tp const &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator!= (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator!= (const optional< _Tp > &__lhs, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator!= (nullopt_t, const optional< _Tp > &__rhs) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator< (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator< (const optional< _Tp > &, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator< (const optional< _Tp > &__lhs, const _Tp &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator< (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator< (nullopt_t, const optional< _Tp > &__rhs) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator<= (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator<= (const optional< _Tp > &__lhs, const _Tp &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator<= (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator<= (const optional< _Tp > &__lhs, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator<= (nullopt_t, const optional< _Tp > &) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator== (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator== (const optional< _Tp > &__lhs, const _Tp &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator== (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator== (const optional< _Tp > &__lhs, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator== (nullopt_t, const optional< _Tp > &__rhs) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator> (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator> (const optional< _Tp > &__lhs, const _Tp &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator> (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator> (const optional< _Tp > &__lhs, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator> (nullopt_t, const optional< _Tp > &) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator>= (const _Tp &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator>= (const optional< _Tp > &, nullopt_t) noexcept
template<typename _Tp >
constexpr bool | std::experimental::operator>= (const optional< _Tp > &__lhs, const _Tp &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator>= (const optional< _Tp > &__lhs, const optional< _Tp > &__rhs)
template<typename _Tp >
constexpr bool | std::experimental::operator>= (nullopt_t, const optional< _Tp > &__rhs) noexcept
template<typename _Tp >
void | std::experimental::swap (optional< _Tp > &__lhs, optional< _Tp > &__rhs) noexcept(noexcept(__lhs.swap(__rhs)))

## Variables

constexpr in_place_t | std::experimental::in_place
constexpr nullopt_t | std::experimental::nullopt

## Detailed Description

This is a TS C++ Library header.

Definition in file optional.

## Macro Definition Documentation

## _GLIBCXX_EXPERIMENTAL_OPTIONAL

#define _GLIBCXX_EXPERIMENTAL_OPTIONAL

Definition at line 30 of file optional.

## Function Documentation

## __constexpr_addressof()

template<typename _Tp >

enable_if_t< _Has_addressof< _Tp >::value, _Tp * > std::experimental::fundamentals_v1::__constexpr_addressof | ( | _Tp & | __t | ) |

inline

Fallback overload that defers to __addressof.

Definition at line 184 of file optional.