experimental.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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>Experimental - 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="./recipes/foreign-try.html"><img src="./images/prev.png" alt="Prev"></a>
  10. <a accesskey="u" href="./index.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="./experimental/advantages.html"><img src="./images/next.png" alt="Next"></a></div><div id="content">
  12. <div class="titlepage"><div><div><h1 style="clear: both">Experimental</h1></div></div></div>
  13. <p>In <code>&lt;boost/outcome/experimental&gt;</code>, there ships an Outcome-based simulation of
  14. the proposed <a href="https://wg21.link/P1095">P1095 <em>Zero overhead deterministic failure</em></a>
  15. specific implementation of <a href="http://wg21.link/P0709">P0709 <em>Zero overhead exceptions: Throwing values</em></a>, aka &ldquo;Herbceptions&rdquo;. This library-only implementation lets you use a close simulacrum
  16. of potential future C++ lightweight exceptions today in <a href="./requirements.html">any C++ 14 compiler
  17. which Outcome supports</a>.</p>
  18. <div class="notices warning" style="background: url('images/warning.png') top left no-repeat padding-box padding-box;">
  19. <div class="notices heading">warning</div>
  20. <div class="notices message"><p><b>It is stressed, in the strongest possible terms, that any item inside
  21. <code>&lt;boost/outcome/experimental&gt;</code> is subject to unannounced breaking change based
  22. on WG21 standards committee feedback</b>. That said, the chances are high
  23. that most of those breaking changes will be to naming rather than to
  24. fundamental semantics, so you can upgrade with a bit of find and replace.
  25. There are quite a few large code bases out there
  26. already using this experimental support in anger, we know it works well
  27. at scale and it&rsquo;s a good bit superior to <code>std::error_code</code> et al on every
  28. measure.</p>
  29. </div>
  30. </div>
  31. <p>P1095&rsquo;s support library has a reference implementation at <a href="https://ned14.github.io/status-code/">https://ned14.github.io/status-code/</a>.
  32. You will find terse documentation there, and an API reference.
  33. This library is wholly incorporated into Outcome in the <code>&lt;boost/outcome/experimental/status-code&gt;</code>
  34. directory, with bindings into Outcome provided in the following headers:</p>
  35. <ul>
  36. <li><code>&lt;boost/outcome/experimental/status_result.hpp&gt;</code></li>
  37. <li><code>&lt;boost/outcome/experimental/status_outcome.hpp&gt;</code></li>
  38. </ul>
  39. <p>These headers import the entire contents of the <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE</code>
  40. namespace into the <code>BOOST_OUTCOME_V2_NAMESPACE::experimental</code> namespace. You
  41. can thus address everything in <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE</code> via
  42. <code>BOOST_OUTCOME_V2_NAMESPACE::experimental</code>.</p>
  43. <p>As P1095 also proposes C language support for lightweight C++ exceptions,
  44. experimental Outcome also has a macro-based C interface that enables C
  45. code to work with the C-compatible subset of <code>status_result&lt;T, E&gt;</code>:</p>
  46. <ul>
  47. <li><code>&lt;boost/outcome/experimental/result.h&gt;</code></li>
  48. </ul>
  49. </div><p><small>Last revised: January 26, 2019 at 21:01:46 UTC</small></p>
  50. <hr>
  51. <div class="spirit-nav">
  52. <a accesskey="p" href="./recipes/foreign-try.html"><img src="./images/prev.png" alt="Prev"></a>
  53. <a accesskey="u" href="./index.html"><img src="./images/up.png" alt="Up"></a>
  54. <a accesskey="h" href="./index.html"><img src="./images/home.png" alt="Home"></a><a accesskey="n" href="./experimental/advantages.html"><img src="./images/next.png" alt="Next"></a></div></body>
  55. </html>