|
|
constexpr | basic_any () |
| | Default constructor.
|
| |
| template<typename Type , typename... Args> |
| | basic_any (std::in_place_type_t< Type >, Args &&...args) |
| | Constructs a wrapper by directly initializing the new object. More...
|
| |
| template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, basic_any>>> |
| | basic_any (Type &&value) |
| | Constructs a wrapper from a given value. More...
|
| |
| | basic_any (const basic_any &other) |
| | Copy constructor. More...
|
| |
| | basic_any (basic_any &&other) |
| | Move constructor. More...
|
| |
|
| ~basic_any () |
| | Frees the internal storage, whatever it means.
|
| |
| basic_any & | operator= (const basic_any &other) |
| | Copy assignment operator. More...
|
| |
| basic_any & | operator= (basic_any &&other) |
| | Move assignment operator. More...
|
| |
| template<typename Type > |
| std::enable_if_t<!std::is_same_v< std::decay_t< Type >, basic_any >, basic_any & > | operator= (Type &&value) |
| | Value assignment operator. More...
|
| |
| const type_info & | type () const |
| | Returns the object type if any, type_id<void>() otherwise. More...
|
| |
| const void * | data () const |
| | Returns an opaque pointer to the contained instance. More...
|
| |
| const void * | data (const type_info &req) const |
| | Returns an opaque pointer to the contained instance. More...
|
| |
| void * | data () |
| | Returns an opaque pointer to the contained instance. More...
|
| |
| void * | data (const type_info &req) |
| | Returns an opaque pointer to the contained instance. More...
|
| |
| template<typename Type , typename... Args> |
| void | emplace (Args &&...args) |
| | Replaces the contained object by creating a new instance directly. More...
|
| |
| bool | assign (const any &other) |
| | Assigns a value to the contained object without replacing it. More...
|
| |
| bool | assign (any &&other) |
| | Assigns a value to the contained object without replacing it. More...
|
| |
|
void | reset () |
| | Destroys contained object.
|
| |
| | operator bool () const |
| | Returns false if a wrapper is empty, true otherwise. More...
|
| |
| bool | operator== (const basic_any &other) const |
| | Checks if two wrappers differ in their content. More...
|
| |
| basic_any | as_ref () |
| | Aliasing constructor. More...
|
| |
| basic_any | as_ref () const |
| | Aliasing constructor. More...
|
| |
| bool | owner () const |
| | Returns true if a wrapper owns its object, false otherwise. More...
|
| |
template<std::size_t Len, std::size_t Align>
class entt::basic_any< Len, Align >
A SBO friendly, type-safe container for single values of any type.
- Template Parameters
-
| Len | Size of the storage reserved for the small buffer optimization. |
| Align | Optional alignment requirement. |
Definition at line 22 of file any.hpp.
template<std::size_t Len, std::size_t Align>
template<typename Type , typename... Args>
Constructs a wrapper by directly initializing the new object.
- Template Parameters
-
| Type | Type of object to use to initialize the wrapper. |
| Args | Types of arguments to use to construct the new instance. |
- Parameters
-
| args | Parameters to use to construct the instance. |
Definition at line 156 of file any.hpp.
template<std::size_t Len, std::size_t Align>
template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, basic_any>>>
Constructs a wrapper from a given value.
- Template Parameters
-
| Type | Type of object to use to initialize the wrapper. |
- Parameters
-
| value | An instance of an object to use to initialize the wrapper. |
Definition at line 167 of file any.hpp.
template<std::size_t Len, std::size_t Align>
template<typename Type , typename... Args>
Replaces the contained object by creating a new instance directly.
- Template Parameters
-
| Type | Type of object to use to initialize the wrapper. |
| Args | Types of arguments to use to construct the new instance. |
- Parameters
-
| args | Parameters to use to construct the instance. |
Definition at line 299 of file any.hpp.