success.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  3. <title>auto success(T &amp;&amp;) - Boost.Outcome documentation</title>
  4. <link rel="stylesheet" href="../../css/boost.css" type="text/css">
  5. <meta name="generator" content="Hugo 0.52 with Boostdoc theme">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  7. <link rel="icon" href="../../images/favicon.ico" type="image/ico"/>
  8. <body><div class="spirit-nav">
  9. <a accesskey="p" href="../../reference/functions/failure.html"><img src="../../images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="../../reference/functions.html"><img src="../../images/up.png" alt="Up"></a>
  11. <a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/functions/try_operation_has_value.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
  12. <div class="titlepage"><div><div><h1 style="clear: both"><code>auto success(T &amp;&amp;)</code></h1></div></div></div>
  13. <p>Returns appropriate type sugar for constructing a successful result or outcome, usually <a href="../../reference/types/success_type.html" class="api-reference"><code>success_type&lt;T&gt;</code></a>
  14. with a decayed <code>T</code>.</p>
  15. <p>Two default overloads are provided, one taking a single parameter returning <code>success_type&lt;std::decay_t&lt;T&gt;&gt;</code> and perfectly forwarding the input. The other overload takes no parameters, and returns <code>success_type&lt;void&gt;</code>, which usually causes the construction of the receiving <code>basic_result</code> or <code>basic_outcome</code>&rsquo;s with a default construction of their value type.</p>
  16. <p><em>Overridable</em>: By Argument Dependent Lookup (ADL).</p>
  17. <p><em>Requires</em>: Always available.</p>
  18. <p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE</code></p>
  19. <p><em>Header</em>: <code>&lt;boost/outcome/success_failure.hpp&gt;</code></p>
  20. </div><p><small>Last revised: February 01, 2019 at 23:42:52 UTC</small></p>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="../../reference/functions/failure.html"><img src="../../images/prev.png" alt="Prev"></a>
  24. <a accesskey="u" href="../../reference/functions.html"><img src="../../images/up.png" alt="Up"></a>
  25. <a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/functions/try_operation_has_value.html"><img src="../../images/next.png" alt="Next"></a></div></body>
  26. </html>