|
#define | __cpp_lib_experimental_any |
|
|
| std::experimental::fundamentals_v1::any::_Storage::_Storage (const _Storage &)=delete |
|
| std::experimental::fundamentals_v1::any::any () noexcept |
|
template<typename _ValueType , typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename enable_if< is_constructible< _Tp, _ValueType && >::value, bool >::type = true> |
| std::experimental::fundamentals_v1::any::any (_ValueType &&__value) |
|
| std::experimental::fundamentals_v1::any::any (any &&__other) noexcept |
|
| std::experimental::fundamentals_v1::any::any (const any &__other) |
|
| std::experimental::fundamentals_v1::any::~any () |
|
template<typename _Tp > |
static constexpr bool | std::experimental::fundamentals_v1::any::__is_valid_cast () |
|
template<typename _Up > |
static void | std::experimental::fundamentals_v1::any::_Manager_internal< _Tp >::_S_create (_Storage &__storage, _Up &&__value) |
|
template<typename _Up > |
static void | std::experimental::fundamentals_v1::any::_Manager_external< _Tp >::_S_create (_Storage &__storage, _Up &&__value) |
|
static void | std::experimental::fundamentals_v1::any::_Manager_internal< any::_Op >::_S_manage (_Op, const any *, _Arg *) |
|
template<typename _ValueType > |
_ValueType | std::experimental::any_cast (const any &__any) |
|
void | std::experimental::fundamentals_v1::any::clear () noexcept |
|
bool | std::experimental::fundamentals_v1::any::empty () const noexcept |
|
template<typename _ValueType > |
enable_if_t<!is_same< any, decay_t< _ValueType > >::value, any & > | std::experimental::fundamentals_v1::any::operator= (_ValueType &&__rhs) |
|
any & | std::experimental::fundamentals_v1::any::operator= (any &&__rhs) noexcept |
|
_Storage & | std::experimental::fundamentals_v1::any::_Storage::operator= (const _Storage &)=delete |
|
any & | std::experimental::fundamentals_v1::any::operator= (const any &__rhs) |
|
void | std::experimental::fundamentals_v1::any::swap (any &__rhs) noexcept |
|
void | std::experimental::swap (any &__x, any &__y) noexcept |
|
const type_info & | std::experimental::fundamentals_v1::any::type () const noexcept |
|
virtual const char * | std::experimental::fundamentals_v1::bad_any_cast::what () const noexcept |
|
|
any * | std::experimental::fundamentals_v1::any::_Arg::_M_any |
|
aligned_storage< sizeof(_M_ptr), alignof(void *)>::type | std::experimental::fundamentals_v1::any::_Storage::_M_buffer |
|
void * | std::experimental::fundamentals_v1::any::_Arg::_M_obj |
|
void * | std::experimental::fundamentals_v1::any::_Storage::_M_ptr |
|
const std::type_info * | std::experimental::fundamentals_v1::any::_Arg::_M_typeinfo |
|
A type-safe container for single values of value types, as described in n3804 "Any Library Proposal (Revision 3)".
◆ any() [1/4]
std::experimental::fundamentals_v1::any::any |
( |
| ) |
|
|
inlinenoexcept |
◆ any() [2/4]
template<typename _ValueType , typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename enable_if< is_constructible< _Tp, _ValueType && >::value, bool >::type = true>
std::experimental::fundamentals_v1::any::any |
( |
_ValueType && |
__value | ) |
|
|
inline |
Construct with a copy of __value
as the contained object.
Definition at line 166 of file experimental/any.
◆ any() [3/4]
std::experimental::fundamentals_v1::any::any |
( |
any && |
__other | ) |
|
|
inlinenoexcept |
Move constructor, transfer the state from __other
.
- Postcondition
__other.empty()
(this postcondition is a GNU extension)
Definition at line 149 of file experimental/any.
◆ any() [4/4]
std::experimental::fundamentals_v1::any::any |
( |
const any & |
__other | ) |
|
|
inline |
Copy constructor, copies the state of __other
.
Definition at line 132 of file experimental/any.
◆ ~any()
std::experimental::fundamentals_v1::any::~any |
( |
| ) |
|
|
inline |
◆ _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 |
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 487 of file experimental/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 |
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 521 of file experimental/any.
◆ any_cast() [1/5]
template<typename _ValueType , typename enable_if<!is_move_constructible< _ValueType >::value||is_lvalue_reference< _ValueType >::value, bool >::type = true>
_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 392 of file experimental/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 378 of file experimental/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 | 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 476 of file experimental/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 355 of file experimental/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 468 of file experimental/any.
◆ clear()
void std::experimental::fundamentals_v1::any::clear |
( |
| ) |
|
|
inlinenoexcept |
◆ empty()
bool std::experimental::fundamentals_v1::any::empty |
( |
| ) |
const |
|
inlinenoexcept |
Reports whether there is a contained object or not.
Definition at line 272 of file experimental/any.
◆ operator=() [1/3]
template<typename _ValueType >
Store a copy of __rhs
as the contained object.
Definition at line 221 of file experimental/any.
◆ operator=() [2/3]
any& std::experimental::fundamentals_v1::any::operator= |
( |
any && |
__rhs | ) |
|
|
inlinenoexcept |
Move assignment operator.
- Postcondition
__rhs.empty()
(not guaranteed for other implementations)
Definition at line 204 of file experimental/any.
◆ operator=() [3/3]
any& std::experimental::fundamentals_v1::any::operator= |
( |
const any & |
__rhs | ) |
|
|
inline |
◆ swap() [1/2]
void std::experimental::fundamentals_v1::any::swap |
( |
any & |
__rhs | ) |
|
|
inlinenoexcept |
◆ swap() [2/2]
void std::experimental::fundamentals_v1::swap |
( |
any & |
__x, |
|
|
any & |
__y |
|
) |
| |
|
inlinenoexcept |
◆ type()
const type_info& std::experimental::fundamentals_v1::any::type |
( |
| ) |
const |
|
inlinenoexcept |
The typeid
of the contained object, or typeid(void)
if empty.
Definition at line 276 of file experimental/any.
◆ what()
virtual const char* std::experimental::fundamentals_v1::bad_any_cast::what |
( |
| ) |
const |
|
inlinevirtualnoexcept |
Returns a C-style character string describing the general cause of the current error.
Reimplemented from std::bad_cast.
Definition at line 70 of file experimental/any.