Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / contract / doc / html / boost / contract / call_if_statement.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Struct template call_if_statement</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Contract 1.0.0">
8 <link rel="up" href="../../reference.html#header.boost.contract.call_if_hpp" title="Header &lt;boost/contract/call_if.hpp&gt;">
9 <link rel="prev" href="../../BOOST_CONTRACT_BASE_TYPES.html" title="Macro BOOST_CONTRACT_BASE_TYPES">
10 <link rel="next" href="call_if__idm45395000098448.html" title="Struct template call_if_statement&lt;false, Then, internal_type&gt;">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../../BOOST_CONTRACT_BASE_TYPES.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.contract.call_if_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="call_if__idm45395000098448.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.contract.call_if_statement"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Struct template call_if_statement</span></h2>
29 <p>boost::contract::call_if_statement &#8212; Select compilation and execution of functor template calls using a static boolean predicate (not needed on C++17 compilers, use <code class="computeroutput">if constexpr</code> instead). </p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../reference.html#header.boost.contract.call_if_hpp" title="Header &lt;boost/contract/call_if.hpp&gt;">boost/contract/call_if.hpp</a>&gt;
33
34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">bool</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Then<span class="special">,</span> <span class="keyword">typename</span> ThenResult <span class="special">=</span> <span class="identifier">internal_type</span><span class="special">&gt;</span> 
35 <span class="keyword">struct</span> <a class="link" href="call_if_statement.html" title="Struct template call_if_statement">call_if_statement</a> <span class="special">{</span>
36 <span class="special">}</span><span class="special">;</span></pre></div>
37 <div class="refsect1">
38 <a name="idm45707998256576"></a><h2>Description</h2>
39 <p>This class template has no members because it is never used directly, it is only used via its specializations. Usually this class template is instantiated only via the return value of  <code class="computeroutput"><a class="link" href="call_if.html" title="Function template call_if">boost::contract::call_if</a></code> and <code class="computeroutput"><a class="link" href="call_if_c.html" title="Function template call_if_c">boost::contract::call_if_c</a></code>.</p>
40 <p><span class="bold"><strong>See Also:</strong></span></p>
41 <p> <a class="link" href="../../boost_contract/extras.html#boost_contract.extras.assertion_requirements__templates_" title="Assertion Requirements (Templates)">
42         Assertion Requirements</a></p>
43 <p>
44 </p>
45 <p>
46
47 </p>
48 <div class="refsect2">
49 <a name="idm45707998251056"></a><h3>Template Parameters</h3>
50 <div class="orderedlist"><ol class="orderedlist" type="1">
51 <li class="listitem">
52 <pre class="literallayout"><span class="keyword">bool</span> Pred</pre>
53 <p>Static boolean predicate that selects which functor template call to compile and execute. </p>
54 </li>
55 <li class="listitem">
56 <pre class="literallayout"><span class="keyword">typename</span> Then</pre>
57 <p>Type of the functor template to call if the static predicate <code class="computeroutput">Pred</code> is <code class="computeroutput">true</code>. </p>
58 </li>
59 <li class="listitem">
60 <pre class="literallayout"><span class="keyword">typename</span> ThenResult <span class="special">=</span> <span class="identifier">internal_type</span></pre>
61 <p>Return type of then-branch functor template call (this is usually automatically deduced by this library so it is never explicitly specified by the user, and that is why it is often marked as <code class="computeroutput">internal_type</code> in this documentation). </p>
62 </li>
63 </ol></div>
64 </div>
65 </div>
66 </div>
67 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
68 <td align="left"></td>
69 <td align="right"><div class="copyright-footer">Copyright &#169; 2008-2019 Lorenzo Caminiti<p>
70         Distributed under the Boost Software License, Version 1.0 (see accompanying
71         file LICENSE_1_0.txt or a copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
72       </p>
73 </div></td>
74 </tr></table>
75 <hr>
76 <div class="spirit-nav">
77 <a accesskey="p" href="../../BOOST_CONTRACT_BASE_TYPES.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.contract.call_if_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="call_if__idm45395000098448.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
78 </div>
79 </body>
80 </html>