Helper function to access the contained object of a std::any instance. Returns a pointer to the object if passed instance has a value and the type matches, nullptr otherwise.
Declared in <util/any.h>
template<typename T>
T*
AnyPtr(std::any const& any) noexcept;
A pointer to the contained T*, or nullptr when empty or of a different type.
| Name | Description |
|---|---|
| any | The std::any instance to inspect. |