Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / outcome / doc / html / reference / traits / is_error_code_available.html
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>is_error_code_available&lt;T&gt; - 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/traits/is_basic_result.html"><img src="../../images/prev.png" alt="Prev"></a>
11     <a accesskey="u" href="../../reference/traits.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/traits/is_error_type.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
13   <div class="titlepage"><div><div><h1 style="clear: both"><code>is_error_code_available&lt;T&gt;</code></h1></div></div></div>
14   <p><code>::value</code> is true if an error code can be constructed from a <code>T</code> e.g. if there exists an ADL discovered free function <code>make_error_code(T)</code>.
15 <code>::type</code> is the type that would result if <code>::value</code> is true, else <code>void</code>.</p>
16
17 <p><em>Overridable</em>: By template specialisation into the <code>trait</code> namespace.</p>
18
19 <p><em>Default</em>: True if <code>T</code> is an error code, else to metaprogramming which performs the ADL discovery of <code>make_error_code(T)</code>. Note that the STL defines multiple overloads of an ADL discovered free function 
20 <a href="https://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=make_error_code" class="api-reference" target="_blank"><i class="fa fa-book" aria-hidden="true"></i> <code>std::make_error_code(T)</code></a>
21  for its error enumerations, as does Boost.System for the Boost error enumerations. Thus this trait will pick up those free functions for those error types.</p>
22
23 <p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE::trait</code></p>
24
25 <p><em>Header</em>: <code>&lt;boost/outcome/trait.hpp&gt;</code></p>
26
27 <p><em>Variable alias</em>: <code>is_error_code_available_v&lt;T&gt;</code></p>
28
29
30         </div><p><small>Last revised: October 10, 2019 at 18:14:56 &#43;0100</small></p>
31 <hr>
32 <div class="spirit-nav">
33 <a accesskey="p" href="../../reference/traits/is_basic_result.html"><img src="../../images/prev.png" alt="Prev"></a>
34     <a accesskey="u" href="../../reference/traits.html"><img src="../../images/up.png" alt="Up"></a>
35     <a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/traits/is_error_type.html"><img src="../../images/next.png" alt="Next"></a></div></body>
36 </html>