assume_value_lvalue_const.html 2.5 KB

12345678910111213141516171819202122232425262728293031
  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>const value_type &amp;assume_value() const &amp; noexcept - 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/types/basic_outcome/assume_value_lvalue.html"><img src="../../../images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="../../../reference/types/basic_outcome.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/types/basic_outcome/assume_value_rvalue.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
  12. <div class="titlepage"><div><div><h1 style="clear: both"><code>const value_type &amp;assume_value() const &amp; noexcept</code></h1></div></div></div>
  13. <p>Narrow contract const lvalue reference observer of any value present. <code>NoValuePolicy::narrow_value_check()</code> is first invoked, then the reference to the value is returned. The convention is that hard undefined behaviour occurs if no value is actually present, however <code>NoValuePolicy::narrow_value_check()</code> can do something to avoid that.</p>
  14. <p>Note that if <code>value_type</code> is <code>void</code>, only a <code>const</code> overload returning <code>void</code> is present.</p>
  15. <p><em>Requires</em>: Always available.</p>
  16. <p><em>Complexity</em>: Depends on <code>NoValuePolicy::narrow_value_check()</code>.</p>
  17. <p><em>Guarantees</em>: An exception is never thrown.</p>
  18. </div><p><small>Last revised: February 12, 2019 at 16:36:24 UTC</small></p>
  19. <hr>
  20. <div class="spirit-nav">
  21. <a accesskey="p" href="../../../reference/types/basic_outcome/assume_value_lvalue.html"><img src="../../../images/prev.png" alt="Prev"></a>
  22. <a accesskey="u" href="../../../reference/types/basic_outcome.html"><img src="../../../images/up.png" alt="Up"></a>
  23. <a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../reference/types/basic_outcome/assume_value_rvalue.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
  24. </html>