[#util-AnyPtr] = xref:util.adoc[util]::AnyPtr :relfileprefix: ../ :mrdocs: 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. == Synopsis Declared in `<util/any.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> T* AnyPtr(std::any const& any) noexcept; ---- == Return Value A pointer to the contained T*, or nullptr when empty or of a different type. == Parameters [cols="1,4"] |=== | Name| Description | *any* | The std::any instance to inspect. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#