[#BloombergLP-bslstl-Function_Rep-target] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Function_Rep.adoc[Function_Rep]::target :relfileprefix: ../../../ :mrdocs: Return a modifiable pointer to the target if its type is `TP`. == Synopsis Declared in `<bslstl_function_rep.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TP> TP* target() const noexcept; ---- == Description If `typeid(TP) == this‐>target_type()`, return a pointer offering modifiable access to this object's target; otherwise return a null pointer. Note that this function is `const` but returns a non‐`const` pointer because, according to the C++ Standard, `function` (and therefore this representation) does not adhere to logical constness conventions. == Return Value modifiable pointer to the target if `TP` matches, else null [.small]#Created with https://www.mrdocs.com[MrDocs]#