folly::make_exception_ptr_with

make_exception_ptr_with overloads

Synopses

Declared in <folly/lang/Exception.h>

Builds an exception_ptr from the exception returned by invoking f.

template<
    typename F,
    decltype(FOLLY_DECLVAL(F&)())* = nullptr>
std::exception_ptr
make_exception_ptr_with(F f) noexcept;
» more...

Builds an exception_ptr managing the moved or copied exception e.

template<typename E>
std::exception_ptr
make_exception_ptr_with(
    std::in_place_t place,
    E&& e) noexcept;
» more...

Builds an exception_ptr managing an E constructed in place from the args.

template<
    typename E,
    typename... A>
std::exception_ptr
make_exception_ptr_with(
    std::in_place_type_t<E> tag,
    A&&... a) noexcept;
» more...

Return Value

  • An exception_ptr managing the exception returned by f.
  • An exception_ptr managing the given exception.
  • An exception_ptr managing the constructed exception of type E.

Parameters

NameDescription
fThe invocable whose return value becomes the managed exception.
placeThe in_place tag selecting this overload.
eThe exception object moved or copied into the managed exception.
tagThe in_place_type tag selecting the exception type E.
aThe arguments forwarded to the constructor of E.