Invoke a callable and return its result or exception in utils::expected.
Definition in file invoke_with_expected.hpp.
Go to the source code of this file.
#include <concepts>#include <exception>#include <functional>#include <type_traits>#include <utility>#include <userver/utils/expected.hpp>Namespaces | |
| namespace | utils |
| General-purpose utilities used across userver libraries. | |
Functions | |
| template<std::invocable Func> | |
| auto | utils::InvokeWithExpected (Func &&func) -> expected< std::decay_t< std::invoke_result_t< Func > >, std::exception_ptr > |
| Invoke a callable and return its result or exception in utils::expected. | |