Manpages - std_experimental_optional.3
Table of Contents
- NAME
- SYNOPSIS
- Detailed Description
- Member Typedef Documentation
- Constructor & Destructor Documentation
- template<typename _Tp > template<typename _Up = _Tp, *enable_if_t*<
- template<typename _Tp > template<typename _Up = _Tp, *enable_if_t*<
- template<typename _Tp > template<typename _Up , *enable_if_t*<
- template<typename _Tp > template<typename _Up , *enable_if_t*<
- template<typename _Tp > template<typename _Up , *enable_if_t*<
- template<typename _Tp > template<typename _Up , *enable_if_t*<
- Member Function Documentation
- template<typename _Tp > template<typename… _Args> *enable_if_t*<
- template<typename _Tp > template<typename _Up , typename… _Args>
- template<typename _Tp > constexpr *std::experimental::optional*< _Tp
- template<typename _Tp > constexpr _Tp &
- template<typename _Tp > constexpr _Tp &&
- template<typename _Tp > constexpr const _Tp &
- template<typename _Tp > constexpr const _Tp &&
- template<typename _Tp > _Tp * *std::experimental::optional*< _Tp
- template<typename _Tp > constexpr const _Tp *
- template<typename _Tp > template<typename _Up = _Tp> *enable_if_t*<
- template<typename _Tp > template<typename _Up > *enable_if_t*<
- template<typename _Tp > optional & *std::experimental::optional*<
- template<typename _Tp > template<typename _Up > *enable_if_t*<
- template<typename _Tp > void *std::experimental::optional*< _Tp
- template<typename _Tp > constexpr _Tp &
- template<typename _Tp > constexpr _Tp &&
- template<typename _Tp > constexpr const _Tp &
- template<typename _Tp > constexpr const _Tp &&
- template<typename _Tp > template<typename _Up > _Tp
- template<typename _Tp > template<typename _Up > constexpr _Tp
- Author
NAME
std::experimental::optional< _Tp > - Class template for optional values.
SYNOPSIS
Inherits std::_Optional_base< _Tp, bool, bool >, and std::_Enable_copy_move< is_copy_constructible< _Tp >::value, __and_< is_copy_constructible< _Tp >, is_copy_assignable< _Tp > >::value, is_move_constructible< _Tp >::value, __and_< is_move_constructible< _Tp >, is_move_assignable< _Tp > >::value, optional< _Tp > >.
Public Types
using value_type = _Tp
Public Member Functions
template<typename _Up = _Tp, enable_if_t*< __and_< __not_< *is_same*<
*optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up &&
>, *is_convertible*< _Up &&, _Tp > >::value, bool > = true> constexpr
*optional (_Up &&__t)
template<typename _Up = _Tp, enable_if_t*< __and_< __not_< *is_same*<
*optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up &&
>, __not_< *is_convertible*< _Up &&, _Tp > > >::value, bool > = false>
constexpr *optional (_Up &&__t)
template<typename _Up , enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, const _Up & >, *is_convertible*< const
_Up &, _Tp >, __not_< __converts_from_optional< _Tp, _Up > > >::value,
bool > = true> constexpr *optional (const *optional*< _Up > &__t)
template<typename _Up , enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, const _Up & >, __not_<
*is_convertible*< const _Up &, _Tp > >, __not_<
__converts_from_optional< _Tp, _Up > > >::value, bool > = false>
constexpr *optional (const *optional*< _Up > &__t)
template<typename _Up , enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, _Up && >, *is_convertible*< _Up &&,
_Tp >, __not_< __converts_from_optional< _Tp, _Up > > >::value, bool > =
true> constexpr *optional (*optional*< _Up > &&__t)
template<typename _Up , enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, _Up && >, __not_< *is_convertible*<
_Up &&, _Tp > >, __not_< __converts_from_optional< _Tp, _Up > >
>::value, bool > = false> constexpr *optional (*optional*< _Up >
&&__t)
template<typename… _Args> enable_if_t*< *is_constructible*< _Tp,
_Args &&… >::value > *emplace (_Args &&… __args)
template<typename _Up , typename… _Args> enable_if_t*<
*is_constructible*< _Tp, *initializer_list*< _Up > &, _Args &&…
>::value > *emplace (*initializer_list*< _Up > __il, _Args &&…
__args)
constexpr operator bool () const noexcept
constexpr _Tp & operator* () &
constexpr _Tp && operator* () &&
constexpr const _Tp & operator* () const &
constexpr const _Tp && operator* () const &&
_Tp * operator-> ()
constexpr const _Tp * operator-> () const
template<typename _Up = _Tp> enable_if_t*< __and_< __not_< *is_same*<
*optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up >,
__not_< __and_< *is_scalar*< _Tp >, *is_same*< _Tp, *decay_t*< _Up > > >
>, *is_assignable*< _Tp &, _Up > >::value, *optional & > operator=
(_Up &&__u)
template<typename _Up > enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, const _Up & >, *is_assignable*< _Tp &,
_Up >, __not_< __converts_from_optional< _Tp, _Up > >, __not_<
__assigns_from_optional< _Tp, _Up > > >::value, *optional & >
operator= (const *optional*< _Up > &__u)
optional & operator= (nullopt_t) noexcept
template<typename _Up > enable_if_t*< __and_< __not_< *is_same*< _Tp,
_Up > >, *is_constructible*< _Tp, _Up >, *is_assignable*< _Tp &, _Up >,
__not_< __converts_from_optional< _Tp, _Up > >, __not_<
__assigns_from_optional< _Tp, _Up > > >::value, *optional & >
operator= (*optional*< _Up > &&__u)
void swap (optional &__other)
noexcept(*is_nothrow_move_constructible*< _Tp >()
&&__is_nothrow_swappable< _Tp >::value)
constexpr _Tp & value () &
constexpr _Tp && value () &&
constexpr const _Tp & value () const &
constexpr const _Tp && value () const &&
template<typename _Up > _Tp value_or (_Up &&__u) &&
template<typename _Up > constexpr _Tp value_or (_Up &&__u) const &
Detailed Description
“template<typename _Tp>
class std::experimental::optional< _Tp >“Class template for optional
values.
Definition at line 428 of file experimental/optional.
Member Typedef Documentation
template<typename _Tp > using *std::experimental::optional*< _Tp
>::value_type = _Tp Definition at line 451 of file experimental/optional.
Constructor & Destructor Documentation
template<typename _Tp > template<typename _Up = _Tp, *enable_if_t*<
__and_< __not_< is_same*< *optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up && >, *is_convertible*< _Up &&, _Tp > >::value, bool > = true> constexpr *std::experimental::optional*< _Tp >::*optional (_Up && __t)= [inline]=, = [constexpr]= Definition at line 464 of file experimental/optional.
template<typename _Tp > template<typename _Up = _Tp, *enable_if_t*<
__and_< __not_< is_same*< *optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up && >, __not_< *is_convertible*< _Up &&, _Tp > > >::value, bool > = false> constexpr *std::experimental::optional*< _Tp >::*optional (_Up && __t)= [inline]=, = [explicit]=, = [constexpr]= Definition at line 473 of file experimental/optional.
template<typename _Tp > template<typename _Up , *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, const _Up & >, *is_convertible*< const _Up &, _Tp >, __not_< __converts_from_optional< _Tp, _Up > > >::value, bool > = true> constexpr *std::experimental::optional*< _Tp >::*optional (const optional*< _Up > & __t)= [inline]=, = [constexpr]= Definition at line *483 of file experimental/optional.
template<typename _Tp > template<typename _Up , *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, const _Up & >, __not_< *is_convertible*< const _Up &, _Tp > >, __not_< __converts_from_optional< _Tp, _Up > > >::value, bool > = false> constexpr *std::experimental::optional*< _Tp >::*optional (const optional*< _Up > & __t)= [inline]=, = [explicit]=, = [constexpr]= Definition at line *496 of file experimental/optional.
template<typename _Tp > template<typename _Up , *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, _Up && >, *is_convertible*< _Up &&, _Tp >, __not_< __converts_from_optional< _Tp, _Up > > >::value, bool > = true> constexpr *std::experimental::optional*< _Tp >::*optional (optional*< _Up > && __t)= [inline]=, = [constexpr]= Definition at line *509 of file experimental/optional.
template<typename _Tp > template<typename _Up , *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, _Up && >, __not_< *is_convertible*< _Up &&, _Tp > >, __not_< __converts_from_optional< _Tp, _Up > > >::value, bool > = false> constexpr *std::experimental::optional*< _Tp >::*optional (optional*< _Up > && __t)= [inline]=, = [explicit]=, = [constexpr]= Definition at line *522 of file experimental/optional.
Member Function Documentation
template<typename _Tp > template<typename… _Args> *enable_if_t*<
is_constructible*< _Tp, _Args &&… >::value > *std::experimental::optional*< _Tp >::emplace (_Args &&… __args)= [inline]= Definition at line *607 of file experimental/optional.
template<typename _Tp > template<typename _Up , typename… _Args>
enable_if_t*< *is_constructible*< _Tp, *initializer_list*< _Up > &, _Args &&… >::value > *std::experimental::optional*< _Tp >::emplace (*initializer_list*< _Up > __il, _Args &&… __args)= [inline]= Definition at line *616 of file experimental/optional.
template<typename _Tp > constexpr *std::experimental::optional*< _Tp
>::operator bool () const= [inline]=, = [explicit]=, = [constexpr]=, = [noexcept]= Definition at line 671 of file experimental/optional.
template<typename _Tp > constexpr _Tp &
std::experimental::optional*< _Tp >::operator () &= [inline]=, = [constexpr]= Definition at line 660 of file experimental/optional.
template<typename _Tp > constexpr _Tp &&
std::experimental::optional*< _Tp >::operator () &&= [inline]=, = [constexpr]= Definition at line 664 of file experimental/optional.
template<typename _Tp > constexpr const _Tp &
std::experimental::optional*< _Tp >::operator () const &= [inline]=, = [constexpr]= Definition at line 656 of file experimental/optional.
template<typename _Tp > constexpr const _Tp &&
std::experimental::optional*< _Tp >::operator () const &&= [inline]=, = [constexpr]= Definition at line 668 of file experimental/optional.
template<typename _Tp > _Tp * *std::experimental::optional*< _Tp
>::operator-> ()= [inline]= Definition at line 652 of file experimental/optional.
template<typename _Tp > constexpr const _Tp *
std::experimental::optional*< _Tp >::operator-> () const= [inline]=, = [constexpr]= Definition at line *648 of file experimental/optional.
template<typename _Tp > template<typename _Up = _Tp> *enable_if_t*<
__and_< __not_< is_same*< *optional*< _Tp >, *decay_t*< _Up > > >, *is_constructible*< _Tp, _Up >, __not_< __and_< *is_scalar*< _Tp >, *is_same*< _Tp, *decay_t*< _Up > > > >, *is_assignable*< _Tp &, _Up > >::value, *optional & > std::experimental::optional*< _Tp >::operator= (_Up && __u)= [inline]= Definition at line *544 of file experimental/optional.
template<typename _Tp > template<typename _Up > *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, const _Up & >, *is_assignable*< _Tp &, _Up >, __not_< __converts_from_optional< _Tp, _Up > >, __not_< __assigns_from_optional< _Tp, _Up > > >::value, *optional & > std::experimental::optional*< _Tp >::operator= (const *optional*< _Up > & __u)= [inline]= Definition at line *563 of file experimental/optional.
template<typename _Tp > optional & *std::experimental::optional*<
_Tp >::operator= (nullopt_t)= [inline]=, = [noexcept]= Definition at line 530 of file experimental/optional.
template<typename _Tp > template<typename _Up > *enable_if_t*<
__and_< __not_< is_same*< _Tp, _Up > >, *is_constructible*< _Tp, _Up >, *is_assignable*< _Tp &, _Up >, __not_< __converts_from_optional< _Tp, _Up > >, __not_< __assigns_from_optional< _Tp, _Up > > >::value, *optional & > std::experimental::optional*< _Tp >::operator= (*optional*< _Up > && __u)= [inline]= Definition at line *588 of file experimental/optional.
template<typename _Tp > void *std::experimental::optional*< _Tp
>::swap (optional*< _Tp > & __other)= [inline]=, = [noexcept]= Definition at line *626 of file experimental/optional.
template<typename _Tp > constexpr _Tp &
std::experimental::optional*< _Tp >::value () &= [inline]=, = [constexpr]= Definition at line *685 of file experimental/optional.
template<typename _Tp > constexpr _Tp &&
std::experimental::optional*< _Tp >::value () &&= [inline]=, = [constexpr]= Definition at line *695 of file experimental/optional.
template<typename _Tp > constexpr const _Tp &
std::experimental::optional*< _Tp >::value () const &= [inline]=, = [constexpr]= Definition at line *675 of file experimental/optional.
template<typename _Tp > constexpr const _Tp &&
std::experimental::optional*< _Tp >::value () const &&= [inline]=, = [constexpr]= Definition at line *705 of file experimental/optional.
template<typename _Tp > template<typename _Up > _Tp
std::experimental::optional*< _Tp >::value_or (_Up && __u) &&= [inline]= Definition at line *729 of file experimental/optional.
template<typename _Tp > template<typename _Up > constexpr _Tp
std::experimental::optional*< _Tp >::value_or (_Up && __u) const &= [inline]=, = [constexpr]= Definition at line *716 of file experimental/optional.
Author
Generated automatically by Doxygen for libstdc++ from the source code.