• 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>operator co_await as TRY operator - 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="../../../tutorial/essential/coroutines/returning.html"><img src="../../../images/prev.png" alt="Prev"></a>
11    <a accesskey="u" href="../../../tutorial/essential/coroutines.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="../../../tutorial/essential/conventions.html"><img src="../../../images/next.png" alt="Next"></a></div><div id="content">
13  <div class="titlepage"><div><div><h1 style="clear: both"><code>operator co_await</code> as TRY operator</h1></div></div></div>
14  <p>Many people have requested that <code>operator co_await</code> be overloaded to
15behave as a TRY operator when supplied with an Outcome type.</p>
16
17<p>Outcome does not implement that extension, nor will we accept PRs
18contributing support for this. We think you should use <code>BOOST_OUTCOME_CO_TRY()</code>
19as this will lead to more maintainable and future proof code.</p>
20
21<p>However, we deliberately do not get in the way of you implementing
22that overload yourself in your own Outcome-based code. Just be sure
23that you document what you are doing loudly and clearly, and be
24aware that future C++ standards may have a proper <code>operator try</code>
25overload mechanism.</p>
26
27
28        </div><p><small>Last revised: April 07, 2020 at 10:22:38 &#43;0100</small></p>
29<hr>
30<div class="spirit-nav">
31<a accesskey="p" href="../../../tutorial/essential/coroutines/returning.html"><img src="../../../images/prev.png" alt="Prev"></a>
32    <a accesskey="u" href="../../../tutorial/essential/coroutines.html"><img src="../../../images/up.png" alt="Up"></a>
33    <a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../tutorial/essential/conventions.html"><img src="../../../images/next.png" alt="Next"></a></div></body>
34</html>
35