|
| | Any ()=default |
| | Default constructor. Constructs an empty Any object.
|
| |
| template<typename T> |
| | Any (const T &value) |
| | Constructs an Any from a const reference.
|
| |
| template<typename T> |
| | Any (T &&value) |
| | Constructs an Any from a rvalue reference.
|
| |
| | Any (const Any &other) |
| | Copy constructor.
|
| |
| | Any (Any &&other) noexcept=default |
| | Move constructor.
|
| |
| Any & | operator= (const Any &other) |
| | Copy assignment operator.
|
| |
| Any & | operator= (Any &&other) noexcept=default |
| | Move assignment operator.
|
| |
| void | Reset () |
| | Clears the stored value.
|
| |
| PEAK_COMMON_NO_DISCARD const std::type_info & | GetType () const |
| | Gets the type of the stored value.
|
| |
| template<typename T> |
| T & | AnyCast () |
| | Casts the stored value to the specified type.
|
| |
| template<typename T> |
| PEAK_COMMON_NO_DISCARD const T & | AnyCast () const |
| | Const version of AnyCast.
|
| |
| PEAK_COMMON_NO_DISCARD bool | HasValue () const |
| | Checks if the Any contains a value.
|
| |
A type-erased container for any copyable value.
This class provides a way to store and retrieve a value of arbitrary type using type erasure. It behaves similarly to std::any and allows type-safe casting via the AnyCast<T>() method.
- Since
- ids_peak_common 1.0