• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1+++
2title = "`auto success(T &&)`"
3description = "Returns appropriate type sugar for constructing a successful result or outcome."
4+++
5
6Returns appropriate type sugar for constructing a successful result or outcome, usually {{% api "success_type<T>" %}} with a decayed `T`.
7
8Two 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.
9
10*Overridable*: By Argument Dependent Lookup (ADL).
11
12*Requires*: Always available.
13
14*Namespace*: `BOOST_OUTCOME_V2_NAMESPACE`
15
16*Header*: `<boost/outcome/success_failure.hpp>`
17