|
constexpr | any () noexcept |
|
template<typename _Tp , typename _VTp = _Decay_if_not_any<_Tp>, typename _Mgr = _Manager<_VTp>, enable_if_t< is_copy_constructible_v< _VTp > &&!__is_in_place_type_v< _VTp >, bool > = true> |
| any (_Tp &&__value) |
|
| any (any &&__other) noexcept |
|
| any (const any &__other) |
|
template<typename _Tp , typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t< _VTp, _Args &&... > = false> |
| any (in_place_type_t< _Tp >, _Args &&... __args) |
|
template<typename _Tp , typename _Up , typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t< _VTp, initializer_list< _Up > &, _Args &&... > = false> |
| any (in_place_type_t< _Tp >, initializer_list< _Up > __il, _Args &&... __args) |
|
| ~any () |
|
template<typename _Tp , typename... _Args> |
__emplace_t< decay_t< _Tp >, _Args... > | emplace (_Args &&... __args) |
|
template<typename _Tp , typename _Up , typename... _Args> |
__emplace_t< decay_t< _Tp >, initializer_list< _Up > &, _Args &&... > | emplace (initializer_list< _Up > __il, _Args &&... __args) |
|
bool | has_value () const noexcept |
|
template<typename _Tp > |
enable_if_t< is_copy_constructible< _Decay_if_not_any< _Tp > >::value, any & > | operator= (_Tp &&__rhs) |
|
any & | operator= (any &&__rhs) noexcept |
|
any & | operator= (const any &__rhs) |
|
void | reset () noexcept |
|
void | swap (any &__rhs) noexcept |
|
const type_info & | type () const noexcept |
|
A type-safe container of any type.
An any
object's state is either empty or it stores a contained object of CopyConstructible type.
- Since
- C++17
Definition at line 80 of file any.
template<typename _Tp , typename _VTp = _Decay_if_not_any<_Tp>, typename _Mgr = _Manager<_VTp>, enable_if_t< is_copy_constructible_v< _VTp > &&!__is_in_place_type_v< _VTp >, bool > = true>
std::any::any |
( |
_Tp && |
__value | ) |
|
|
inline |
Construct with a copy of __value
as the contained object.
Definition at line 190 of file any.
template<typename _Tp , typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t< _VTp, _Args &&... > = false>
std::any::any |
( |
in_place_type_t< _Tp > |
, |
|
|
_Args &&... |
__args |
|
) |
| |
|
inlineexplicit |
Construct with an object created from __args
as the contained object.
Definition at line 201 of file any.
template<typename _Tp , typename _Up , typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t< _VTp, initializer_list< _Up > &, _Args &&... > = false>
std::any::any |
( |
in_place_type_t< _Tp > |
, |
|
|
initializer_list< _Up > |
__il, |
|
|
_Args &&... |
__args |
|
) |
| |
|
inlineexplicit |
Construct with an object created from __il
and __args
as the contained object.
Definition at line 214 of file any.