#include "Any.hpp"
Public Member Functions | |
| template<typename ValueType > | |
| Any (const ValueType &value) | |
| Any (const Any &other) | |
| Any (Any &&other) noexcept | |
| 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 & | swap (Any &rhs) noexcept |
| Any & | operator= (const Any &rhs) |
| Any & | operator= (Any &&rhs) noexcept |
| template<class ValueType > | |
| Any & | operator= (ValueType &&rhs) |
| bool | empty () const noexcept |
| void | clear () noexcept |
| std::type_index | type () const noexcept |
Friends | |
| template<typename ValueType > | |
| ValueType * | any_cast (Any *) noexcept |
| template<typename ValueType > | |
| ValueType * | unsafe_any_cast (Any *) noexcept |
Any can store any object without sacrificing type safety. Class is strongly based on boost::any except that the type() member function doesn't return a const std::type_index & (but a copy std::type_index)