Range-v3 Range algorithms, views, and actions for the Standard Library |

Classes | Functions | Variables
optional.hpp File Reference

## Classes
struct | ranges::bad_optional_access
struct | ranges::nullopt_t
struct | ranges::nullopt_t::tag
struct | ranges::optional< T >
struct | ranges::optional< T >

## Functions
template<typename T , typename... Args>
constexpr auto | ranges::make_optional (Args &&... args) noexcept(noexcept(optional< T >{in_place, static_cast< Args && >(args)...})) -> decltype(optional< T >
template<typename T , typename U , typename... Args>
constexpr auto | ranges::make_optional (std::initializer_list< U > il, Args &&... args) noexcept(noexcept(optional< T >{in_place, il, static_cast< Args && >(args)...})) -> decltype(optional< T >
template<typename T >
constexpr auto | ranges::make_optional (T &&t) noexcept(noexcept(optional< detail::decay_t< T >>{static_cast< T && >(t)})) -> decltype(optional< detail::decay_t< T >>

## Variables
constexpr nullopt_t | ranges::nullopt {nullopt_t::tag{}}
template<typename U , typename T >
concept | ranges::optional_should_convert
template<typename U , typename T >
concept | ranges::optional_should_convert_assign

## Variable Documentation

## ◆ optional_should_convert

template<typename U , typename T >

concept ranges::optional_should_convert

Initial value:
=
!(
constructible_from<T, optional<U> & > ||
constructible_from<T, optional<U> && > ||
constructible_from<T, optional<U> const & > ||
constructible_from<T, optional<U> const &&> ||
convertible_to<optional<U> &, T> ||
convertible_to<optional<U> &&, T> ||
convertible_to<optional<U> const &, T> ||
convertible_to<optional<U> const &&, T>
)

## ◆ optional_should_convert_assign

template<typename U , typename T >

concept ranges::optional_should_convert_assign

Initial value:
=
optional_should_convert<U, T> &&
!(assignable_from<T &, optional<U> &> ||
assignable_from<T &, optional<U> &&> ||
assignable_from<T &, optional<U> const &> ||
assignable_from<T &, optional<U> const &&>)