|
| any () noexcept |
|
| any (const any &other) |
|
| any (any &&other) noexcept |
|
template<typename ValueType > |
| any (const ValueType &value) |
|
template<typename ValueType > |
| any (ValueType &&value, typename std::enable_if<!std::is_same< any &, ValueType >::value >::type *=0, typename std::enable_if<!std::is_const< ValueType >::value >::type *=0) |
|
| ~any () noexcept |
|
any & | operator= (const any &rhs) |
|
any & | operator= (any &&rhs) noexcept |
|
template<class ValueType > |
any & | operator= (ValueType &&rhs) |
|
void | reset () noexcept |
|
any & | swap (any &rhs) noexcept |
|
bool | has_value () const noexcept |
|
const std::type_info & | type () const noexcept |
|
The class any describes a type-safe container for single values of any type. An object of class any stores an instance of any type that satisfies the constructor requirements or is empty, and this is referred to as the state of the class any object. The stored instance is called the contained object. Two states are equivalent if they are either both empty or if both are not empty and if the contained objects are equivalent. The non-member any_cast functions provide type-safe access to the contained object.
Definition at line 75 of file any.h.
template<typename ValueType >
RobotsIO::Utils::any::any |
( |
const ValueType & |
value | ) |
|
|
inline |
Constructs an object with initial content an object of type std::decay_t<ValueType>, direct-initialized from std::forward<ValueType>(value). If std::is_copy_constructible<std::decay_t<ValueType>>::value is false, the program is ill-formed.
Definition at line 114 of file any.h.
template<typename ValueType >
RobotsIO::Utils::any::any |
( |
ValueType && |
value, |
|
|
typename std::enable_if<!std::is_same< any &, ValueType >::value >::type * |
= 0 , |
|
|
typename std::enable_if<!std::is_const< ValueType >::value >::type * |
= 0 |
|
) |
| |
|
inline |
Constructs an object with initial content an object of type std::decay_t<ValueType>, direct-initialized from std::forward<ValueType>(value). If std::is_copy_constructible<std::decay_t<ValueType>>::value is false, the program is ill-formed.
Definition at line 125 of file any.h.
template<class ValueType >
any & RobotsIO::Utils::any::operator= |
( |
ValueType && |
rhs | ) |
|
|
inline |
Assigns contents to the contained value. Assigns the type and value of rhs, as if by any(std::forward<ValueType>(rhs)).swap(*this). This overload only participates in overload resolution if std::decay_t<ValueType> is not the same type as any and std::is_copy_constructible_v<std::decay_t<ValueType>> is true.
- Parameters
-
rhs | object whose contained value to assign |
Definition at line 176 of file any.h.