libstdc++
|
#include <any>
Public Member Functions | |
any () noexcept | |
template<typename _ValueType, typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename enable_if< is_constructible< _Tp, _ValueType && >::value, bool >::type = true> | |
any (_ValueType &&__value) | |
template<typename _ValueType, typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename enable_if<!is_constructible< _Tp, _ValueType && >::value, bool >::type = false> | |
any (_ValueType &&__value) | |
any (any &&__other) noexcept | |
any (const any &__other) | |
~any () | |
void | clear () noexcept |
bool | empty () const noexcept |
template<typename _ValueType> | |
enable_if_t<!is_same< any, decay_t< _ValueType > >::value, any & > | operator= (_ValueType &&__rhs) |
any & | operator= (any &&__rhs) noexcept |
any & | operator= (const any &__rhs) |
void | swap (any &__rhs) noexcept |
const type_info & | type () const noexcept |
Static Public Member Functions | |
template<typename _Tp> | |
static constexpr bool | __is_valid_cast () |
Friends | |
template<typename _Tp> | |
enable_if_t< is_object< _Tp >::value, void * > | __any_caster (const any *__any) |
A type-safe container of any type.
An any
object's state is either empty or it stores a contained object of CopyConstructible type.
Definition at line 94 of file experimental/any.
|
inlinenoexcept |
Default constructor, creates an empty object.
Definition at line 133 of file experimental/any.
|
inline |
Copy constructor, copies the state of __other
.
Definition at line 136 of file experimental/any.
|
inlinenoexcept |
Move constructor, transfer the state from __other
.
__other.empty()
(this postcondition is a GNU extension) Definition at line 153 of file experimental/any.
|
inline |
Construct with a copy of __value
as the contained object.
Definition at line 170 of file experimental/any.
|
inline |
Construct with a copy of __value
as the contained object.
Definition at line 183 of file experimental/any.
|
inline |
Destructor, calls clear()
Definition at line 192 of file experimental/any.
|
inlinestaticconstexpr |
Definition at line 291 of file experimental/any.
|
inlinenoexcept |
If not empty, destroy the contained object.
Definition at line 234 of file experimental/any.
|
inlinenodiscardnoexcept |
Reports whether there is a contained object or not.
Definition at line 276 of file experimental/any.
|
inline |
Store a copy of __rhs
as the contained object.
Definition at line 225 of file experimental/any.
Move assignment operator.
__rhs.empty()
(not guaranteed for other implementations) Definition at line 208 of file experimental/any.
Copy the state of another object.
Definition at line 197 of file experimental/any.
|
inlinenoexcept |
Exchange state with another object.
Definition at line 244 of file experimental/any.
|
inlinenoexcept |
The typeid
of the contained object, or typeid(void)
if empty.
Definition at line 280 of file experimental/any.