Detailed Description
A type-safe container for single values of value types, as described in n3804 "Any Library Proposal (Revision 3)".
Function Documentation
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 304 of file any.
Referenced by std::experimental::fundamentals_v1::any_cast().
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 327 of file any.
References std::experimental::fundamentals_v1::any_cast().
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 338 of file any.
References std::experimental::fundamentals_v1::any_cast().
template<typename _ValueType >
const _ValueType* std::experimental::fundamentals_v1::any_cast |
( |
const any * |
__any | ) |
[inline] |
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 361 of file any.
template<typename _ValueType >
_ValueType* std::experimental::fundamentals_v1::any_cast |
( |
any * |
__any | ) |
[inline] |
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 369 of file any.
void std::experimental::fundamentals_v1::swap |
( |
any & |
__x, |
|
|
any & |
__y |
|
) |
| [inline] |
Exchange the states of two any
objects.
Definition at line 291 of file any.