|
| any () noexcept |
| Default constructor.
|
|
template<typename Type , typename... Args> |
| any (std::in_place_type_t< Type >, [[maybe_unused]] Args &&... args) |
| Constructs a meta any by directly initializing the new object. More...
|
|
template<typename Type > |
| any (std::reference_wrapper< Type > type) |
| Constructs a meta any that holds an unmanaged object. More...
|
|
| any (handle handle) noexcept |
| Constructs a meta any from a meta handle object. More...
|
|
template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, any>>> |
| any (Type &&type) |
| Constructs a meta any from a given value. More...
|
|
| any (const any &other) |
| Copy constructor. More...
|
|
| any (any &&other) noexcept |
| Move constructor. More...
|
|
| ~any () |
| Frees the internal storage, whatever it means.
|
|
template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, any>>> |
any & | operator= (Type &&type) |
| Assignment operator. More...
|
|
any & | operator= (const any &other) |
| Copy assignment operator. More...
|
|
any & | operator= (any &&other) noexcept |
| Move assignment operator. More...
|
|
meta::type | type () const noexcept |
| Returns the meta type of the underlying object. More...
|
|
const void * | data () const noexcept |
| Returns an opaque pointer to the contained instance. More...
|
|
void * | data () noexcept |
| Returns an opaque pointer to the contained instance. More...
|
|
template<typename Type > |
const Type * | try_cast () const noexcept |
| Tries to cast an instance to a given type. More...
|
|
template<typename Type > |
Type * | try_cast () noexcept |
| Tries to cast an instance to a given type. More...
|
|
template<typename Type > |
const Type & | cast () const noexcept |
| Tries to cast an instance to a given type. More...
|
|
template<typename Type > |
Type & | cast () noexcept |
| Tries to cast an instance to a given type. More...
|
|
template<typename Type > |
any | convert () const |
| Tries to convert an instance to a given type and returns it. More...
|
|
template<typename Type > |
bool | convert () |
| Tries to convert an instance to a given type. More...
|
|
template<typename Type , typename... Args> |
void | emplace (Args &&... args) |
| Replaces the contained object by initializing a new instance directly. More...
|
|
| operator bool () const noexcept |
| Returns false if a container is empty, true otherwise. More...
|
|
bool | operator== (const any &other) const noexcept |
| Checks if two containers differ in their content. More...
|
|
Meta any object.
TURN_OFF_DOXYGEN A meta any is an opaque container for single values of any type.
This class uses a technique called small buffer optimization (SBO) to completely eliminate the need to allocate memory, where possible.
From the user's point of view, nothing will change, but the elimination of allocations will reduce the jumps in memory and therefore will avoid chasing of pointers. This will greatly improve the use of the cache, thus increasing the overall performance.
Definition at line 299 of file meta.hpp.