[#util-AnyPtr]
= xref:util.adoc[util]::AnyPtr
:relfileprefix: ../
:mrdocs:

Helper function to access the contained object of a std&colon;&colon;any instance&period; Returns a pointer to the object if passed instance has a value and the type matches, nullptr otherwise&period;

== Synopsis

Declared in `&lt;util&sol;any&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
T*
AnyPtr(std::any const& any) noexcept;
----

== Return Value

A pointer to the contained T&ast;, or nullptr when empty or of a different type&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *any*
| The std&colon;&colon;any instance to inspect&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
