MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / any_cast

Function any_cast

framework/include/cppmicroservices/Any.h:809–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807 */
808 template <typename ValueType>
809 ValueType*
810 any_cast(Any* operand)
811 {
812 return operand && operand->Type() == typeid(ValueType)
813 ? &static_cast<Any::Holder<ValueType>*>(operand->_content.get())->_held
814 : nullptr;
815 }
816
817 /**
818 * \ingroup gr_any

Callers

nothing calls this directly

Calls 2

ThrowBadAnyCastExceptionFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected