update reference docs

[SVN r20792]
This commit is contained in:
Aleksey Gurtovoy committed 2003-11-12 07:55:12 +00:00
1 parent f4c12dbfdc
commit 43af4b3bea
16 files changed
+384 -25

No files matched your search

+5 -5
View File
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical or</em> (<code>||</code>) operat
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef or_&lt;f1,f2,..,fn&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Returns <code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
<tr><td><code>or_&lt;f1,f2,..,fn&gt;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td><code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
</table>
<p>
<h3>Example</h3>
@@ -50,13 +50,13 @@ template&lt; typename T &gt; struct fail
typedef typename T::nonexistent type;
};
<p>
BOOST_STATIC_ASSERT((or_&lt; false_,true_ &gt;::type::value == true));
BOOST_STATIC_ASSERT((or_&lt; true_,fail&lt;int&gt; &gt;::type::value == true)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_,fail&lt;int&gt; &gt;::type::value == true)); <span class="cxx-comment">// OK too</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_ &gt;::value == true));
BOOST_STATIC_ASSERT((or_&lt; true_,fail&lt;int&gt; &gt;::value == true)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_,fail&lt;int&gt; &gt;::value == true)); <span class="cxx-comment">// OK too</span>
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/and.html">and_</a></code>, <code><a href="../Reference/not.html">not_</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:18 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:14 am</body></html>