folly::stack_epitaph

Annotates the error state of a result<T> with a stack-trace epitaph.

Synopsis

Declared in <folly/result/epitaph.h>

template<
    /* implementation-defined */ Opt = detail::stack_epitaph_opts{},
    typename T,
    typename... Args>
result<T>
stack_epitaph(
    result<T> r,
    ext::format_string_and_location<Args...> snl = "",
    Args const&... args);

Description

Value inputs are returned unchanged.

Return Value

The result, with its error state annotated when present.

Parameters

NameDescription
rThe result to annotate.
snlThe format string and captured source location.
argsFormat arguments for the annotation message.