folly::exception_ptr_get_object_hint

exception_ptr_get_object_hint overloads

Synopses

Declared in <folly/lang/Exception.h>

Returns the stored exception upcast to T, using the type's own hint types.

template<typename T>
T*
exception_ptr_get_object_hint(std::exception_ptr const& ptr) noexcept;
» more...

exception_ptr_get_object_hint

template<
    typename T,
    typename... S>
T*
exception_ptr_get_object_hint(
    std::exception_ptr const& ptr,
    tag_t<S...> const hint) noexcept;
» more...

Return Value

A pointer to the stored exception as T, or null if not convertible.

Parameters

NameDescription
ptrThe exception_ptr whose stored exception is inspected.
hintThe tag listing candidate concrete types to try as a fast path.