ranges::optional< T > Struct Template Reference
Inheritance diagram for ranges::optional< T >:

## Public Types

using | value_type = meta::_t< std::remove_cv< T > >

## Public Member Functions

template<typename... Args>
auto | emplace (Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value) -> T &requires constructible_from< T, Args... >
template<typename E , typename... Args>
auto | emplace (std::initializer_list< E > il, Args &&... args) noexcept(std::is_nothrow_constructible< T, std::initializer_list< E > &, Args... >::value) -> T &requires constructible_from< T, std::initializer_list< E > &, Args &&... >
constexpr | operator bool () const noexcept
constexpr optional & | operator= (nullopt_t) noexcept
optional & | operator= (optional const &)=default
optional & | operator= (optional &&)=default
template<typename U = T>
constexpr auto | operator= (U &&u) noexcept(std::is_nothrow_constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value) -> optional &requires(!defer::same_as< optional, detail::decay_t< U >>) &&(!(defer::satisfies< T, std::is_scalar > &&defer::same_as< T, detail::decay_t< U >>)) &&defer::constructible_from< T, U > &&defer::assignable_from< T &, U >
template<typename U >
constexpr auto | operator= (optional< U > const &that) -> optional &requires optional_should_convert_assign< U, T > &&constructible_from< T, const U &> &&assignable_from< T &, const U &>
template<typename U >
constexpr auto | operator= (optional< U > &&that) -> optional &requires optional_should_convert_assign< U, T > &&constructible_from< T, U > &&assignable_from< T &, U >
constexpr | optional (nullopt_t) noexcept
| optional (optional const &)=default
| optional (optional &&)=default
template<typename E , typename... Args>
requires constructible_from< T, std::initializer_list< E > &, Args... > constexpr | optional (in_place_t, std::initializer_list< E > il, Args &&... args) noexcept(std::is_nothrow_constructible< T, std::initializer_list< E > &, Args... >::value)
template<typename U = T>
constexpr | optional (U &&v) requires(!defer
template<typename U = T>
constexpr | optional (U &&v) requires(!defer
template<typename U >
| optional (optional< U > const &that) requires optional_should_convert< U
template<typename U >
| optional (optional< U > const &that) requires optional_should_convert< U
template<typename U >
| optional (optional< U > &&that) requires optional_should_convert< U
template<typename U >
| optional (optional< U > &&that) requires optional_should_convert< U
constexpr T const & | value () const &
constexpr T & | value () &
constexpr T const && | value () const &&
constexpr T && | value () &&
template<typename U >
requires copy_constructible< T > &&convertible_to< U, T > constexpr T | value_or (U &&u) const &
template<typename U >
requires move_constructible< T > &&convertible_to< U, T > constexpr T | value_or (U &&u) &&

## Public Attributes

T &&constructible_from< T, U const & > && | !convertible_to< U const &, T >
T &&constructible_from< T, U > && | !convertible_to< U, T >
T &&constructible_from< T, U const & > && | convertible_to< U const &, T >
T &&constructible_from< T, U > && | convertible_to< U, T >

## Member Data Documentation

## !convertible_to< U const &, T >

template<typename T>

T&& constructible_from<T, U const &>&& ranges::optional< T >::!convertible_to< U const &, T >

Initial value:
{
if(that.has_value())
base_t::construct_from(*that)

## !convertible_to< U, T >

template<typename T>

T&& constructible_from<T, U>&& ranges::optional< T >::!convertible_to< U, T >

Initial value:
{
if(that.has_value())
base_t::construct_from(detail::move(*that))

## convertible_to< U const &, T >

template<typename T>

T&& constructible_from<T, U const &>&& ranges::optional< T >::convertible_to< U const &, T >

Initial value:
{
if(that.has_value())
base_t::construct_from(*that)

## convertible_to< U, T >

template<typename T>

T&& constructible_from<T, U>&& ranges::optional< T >::convertible_to< U, T >

Initial value:
{
if(that.has_value())
base_t::construct_from(detail::move(*that))