Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
Prev Up HomeNext

auto success(T &&)

Returns appropriate type sugar for constructing a successful result or outcome, usually success_type<T> with a decayed T.

Two default overloads are provided, one taking a single parameter returning success_type<std::decay_t<T>> and perfectly forwarding the input. The other overload takes no parameters, and returns success_type<void>, which usually causes the construction of the receiving basic_result or basic_outcome’s with a default construction of their value type.

Overridable: By Argument Dependent Lookup (ADL).

Requires: Always available.


Header: <boost/outcome/success_failure.hpp>

Last revised: February 01, 2019 at 23:42:52 UTC

Prev Up HomeNext