A type-safe container for single values of value types, as described in n3804 "Any Library Proposal (Revision 3)".
◆ __cpp_lib_experimental_any
#define __cpp_lib_experimental_any |
Definition at line 60 of file any.
◆ __throw_bad_any_cast()
void std::experimental::fundamentals_v1::__throw_bad_any_cast |
( |
| ) |
|
|
inline |
Definition at line 72 of file any.
◆ _S_manage() [1/2]
template<typename _Tp >
void std::experimental::fundamentals_v1::any::_Manager_internal< _Tp >::_S_manage |
( |
_Op |
__which, |
|
|
const any * |
__anyp, |
|
|
_Arg * |
__arg |
|
) |
| |
|
static |
Definition at line 483 of file any.
◆ _S_manage() [2/2]
template<typename _Tp >
void std::experimental::fundamentals_v1::any::_Manager_external< _Tp >::_S_manage |
( |
_Op |
__which, |
|
|
const any * |
__anyp, |
|
|
_Arg * |
__arg |
|
) |
| |
|
static |
Definition at line 517 of file any.
◆ any_cast() [1/5]
_ValueType std::experimental::fundamentals_v1::any_cast |
( |
any && |
__any | ) |
|
|
inline |
Access the contained object.
- Template Parameters
-
_ValueType | A reference or CopyConstructible type. |
- Parameters
-
__any | The object to access. |
- Returns
- The contained object.
- Exceptions
-
bad_any_cast | If __any.type() != typeid(remove_reference_t<_ValueType>) |
Definition at line 389 of file any.
◆ any_cast() [2/5]
template<typename _ValueType >
_ValueType std::experimental::fundamentals_v1::any_cast |
( |
any & |
__any | ) |
|
|
inline |
Access the contained object.
- Template Parameters
-
_ValueType | A reference or CopyConstructible type. |
- Parameters
-
__any | The object to access. |
- Returns
- The contained object.
- Exceptions
-
bad_any_cast | If __any.type() != typeid(remove_reference_t<_ValueType>) |
Definition at line 375 of file any.
◆ any_cast() [3/5]
template<typename _ValueType >
_ValueType * std::experimental::fundamentals_v1::any_cast |
( |
any * |
__any | ) |
|
|
inlinenoexcept |
Access the contained object.
- Template Parameters
-
_ValueType | The type of the contained object. |
- Parameters
-
__any | A pointer to the object to access. |
- Returns
- The address of the contained object if
__any != nullptr && __any.type() == typeid(_ValueType)
, otherwise a null pointer.
Definition at line 473 of file any.
◆ any_cast() [4/5]
template<typename _ValueType >
_ValueType std::experimental::fundamentals_v1::any_cast |
( |
const any & |
__any | ) |
|
|
inline |
Access the contained object.
- Template Parameters
-
_ValueType | A const-reference or CopyConstructible type. |
- Parameters
-
__any | The object to access. |
- Returns
- The contained object.
- Exceptions
-
bad_any_cast | If __any.type() != typeid(remove_reference_t<_ValueType>) |
Definition at line 352 of file any.
◆ any_cast() [5/5]
template<typename _ValueType >
const _ValueType * std::experimental::fundamentals_v1::any_cast |
( |
const any * |
__any | ) |
|
|
inlinenoexcept |
Access the contained object.
- Template Parameters
-
_ValueType | The type of the contained object. |
- Parameters
-
__any | A pointer to the object to access. |
- Returns
- The address of the contained object if
__any != nullptr && __any.type() == typeid(_ValueType)
, otherwise a null pointer.
Definition at line 465 of file any.
◆ swap()
void std::experimental::fundamentals_v1::swap |
( |
any & |
__x, |
|
|
any & |
__y |
|
) |
| |
|
inlinenoexcept |
Exchange the states of two any
objects.
Definition at line 339 of file any.