BloombergLP::bslstl::Function_Rep::target

Return a modifiable pointer to the target if its type is TP.

Synopsis

Declared in <bslstl_function_rep.h>

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