• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>Macros - 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
8<link rel="icon" href="../images/favicon.ico" type="image/ico"/>
9<body><div class="spirit-nav">
10<a accesskey="p" href="../reference.html"><img src="../images/prev.png" alt="Prev"></a>
11    <a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
12    <a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference/macros/template.html"><img src="../images/next.png" alt="Next"></a></div><div id="content">
13
14  <div class="titlepage"><div><div><h1 style="clear: both">Macros</h1></div></div></div>
15<ol class="children children-li"><li>
16	<a href="../reference/macros/template.html" >Constrained template macros</a><li>
17	<a href="../reference/macros/version.html" >Version macros</a><li>
18	<a href="../reference/macros/co_try.html" ><code>BOOST_OUTCOME_CO_TRY(var, expr)</code></a>
19<p>Evaluate within a coroutine an expression which results in an understood type, assigning <code>T</code> to a variable called <code>var</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
20	<a href="../reference/macros/co_tryv.html" ><code>BOOST_OUTCOME_CO_TRYV(expr)/BOOST_OUTCOME_CO_TRY(expr)</code></a>
21<p>Evaluate from within a coroutine an expression which results in an understood type, continuing execution if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
22	<a href="../reference/macros/co_tryv_failure_likely.html" ><code>BOOST_OUTCOME_CO_TRYV_FAILURE_LIKELY(expr)/BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY(expr)</code></a>
23<p>Evaluate from within a coroutine an expression which results in an understood type, continuing execution if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
24	<a href="../reference/macros/co_tryx.html" ><code>BOOST_OUTCOME_CO_TRYX(expr)</code></a>
25<p>Evaluate from within a coroutine an expression which results in an understood type, emitting the <code>T</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
26	<a href="../reference/macros/co_tryx_failure_likely.html" ><code>BOOST_OUTCOME_CO_TRYX_FAILURE_LIKELY(expr)</code></a>
27<p>Evaluate from within a coroutine an expression which results in an understood type, emitting the <code>T</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
28	<a href="../reference/macros/co_try_failure_likely.html" ><code>BOOST_OUTCOME_CO_TRY_FAILURE_LIKELY(var, expr)</code></a>
29<p>Evaluate within a coroutine an expression which results in an understood type, assigning <code>T</code> to a variable called <code>var</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
30	<a href="../reference/macros/disable_execinfo.html" ><code>BOOST_OUTCOME_DISABLE_EXECINFO</code></a>
31<p>If defined, disables the use of the <code>&lt;execinfo.h&gt;</code> header (or the win32 emulation).</p><li>
32	<a href="../reference/macros/enable_legacy_support_for.html" ><code>BOOST_OUTCOME_ENABLE_LEGACY_SUPPORT_FOR</code></a>
33<p>Enables backwards features and naming compatibility for earlier versions of Outcome.</p><li>
34	<a href="../reference/macros/nodiscard.html" ><code>BOOST_OUTCOME_NODISCARD</code></a>
35<p>How to tell the compiler than the return value of a function should not be discarded without examining it.</p><li>
36	<a href="../reference/macros/requires.html" ><code>BOOST_OUTCOME_REQUIRES(...)</code></a>
37<p>A C++ 20 <code>requires(...)</code>, if available.</p><li>
38	<a href="../reference/macros/symbol_visible.html" ><code>BOOST_OUTCOME_SYMBOL_VISIBLE</code></a>
39<p>How to mark throwable types as always having default ELF symbol visibility.</p><li>
40	<a href="../reference/macros/thread_local.html" ><code>BOOST_OUTCOME_THREAD_LOCAL</code></a>
41<p>How to mark variables as having thread local storage duration.</p><li>
42	<a href="../reference/macros/throw_exception.html" ><code>BOOST_OUTCOME_THROW_EXCEPTION(expr)</code></a>
43<p>How to throw a C++ exception, or equivalent thereof.</p><li>
44	<a href="../reference/macros/try.html" ><code>BOOST_OUTCOME_TRY(var, expr)</code></a>
45<p>Evaluate an expression which results in an understood type, assigning <code>T</code> to a variable called <code>var</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
46	<a href="../reference/macros/tryv.html" ><code>BOOST_OUTCOME_TRYV(expr)/BOOST_OUTCOME_TRY(expr)</code></a>
47<p>Evaluate an expression which results in an understood type, continuing execution if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
48	<a href="../reference/macros/tryv_failure_likely.html" ><code>BOOST_OUTCOME_TRYV_FAILURE_LIKELY(expr)/BOOST_OUTCOME_TRY_FAILURE_LIKELY(expr)</code></a>
49<p>Evaluate an expression which results in an understood type, continuing execution if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
50	<a href="../reference/macros/tryx.html" ><code>BOOST_OUTCOME_TRYX(expr)</code></a>
51<p>Evaluate an expression which results in an understood type, emitting the <code>T</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
52	<a href="../reference/macros/tryx_failure_likely.html" ><code>BOOST_OUTCOME_TRYX_FAILURE_LIKELY(expr)</code></a>
53<p>Evaluate an expression which results in an understood type, emitting the <code>T</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
54	<a href="../reference/macros/try_failure_likely.html" ><code>BOOST_OUTCOME_TRY_FAILURE_LIKELY(var, expr)</code></a>
55<p>Evaluate an expression which results in an understood type, assigning <code>T</code> to a variable called <code>var</code> if successful, immediately returning <code>try_operation_return_as(X)</code> from the calling function if unsuccessful.</p><li>
56	<a href="../reference/macros/in_place_type.html" ><code>BOOST_OUTCOME_USE_STD_IN_PLACE_TYPE</code></a>
57<p>How to implement <code>in_place_type_t&lt;T&gt;</code> and <code>in_place_type&lt;T&gt;</code>.</p><li>
58	<a href="../reference/macros/is_nothrow_swappable.html" ><code>BOOST_OUTCOME_USE_STD_IS_NOTHROW_SWAPPABLE</code></a>
59<p>How to implement <code>is_nothrow_swappable&lt;T&gt;</code>.</p></li></ol>
60
61
62
63
64
65
66
67
68        </div><p><small>Last revised: December 10, 2018 at 20:32:00 UTC</small></p>
69<hr>
70<div class="spirit-nav">
71<a accesskey="p" href="../reference.html"><img src="../images/prev.png" alt="Prev"></a>
72    <a accesskey="u" href="../reference.html"><img src="../images/up.png" alt="Up"></a>
73    <a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference/macros/template.html"><img src="../images/next.png" alt="Next"></a></div></body>
74</html>
75