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

@@ -0,0 +1,50 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::BOOST_MPL_AUX_LAMBDA_SUPPORT</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>BOOST_MPL_AUX_LAMBDA_SUPPORT</h1><h3>Synopsis</h3>
<p>
<pre>
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(arity, fun, params) \
<em>unspecified token sequence</em> \
/**/
</pre>
<p>
<h3>Description</h3>
<p>
Broken compiler workaround macro, enables metafunction <code>fun</code> for the use in lambda expressions on compilers that don't support partial template specialization or/and template template parameters. Expands to nothing on conforming compilers.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/aux_/lambda_support.hpp">boost/mpl/aux_/lambda_support.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>arity</code></td><td>The metafunction's arity, i.e. the number of its template parameters, including the defaults. </td></tr>
<tr><td><code>fun</code></td><td>The metafunction's name. </td></tr>
<tr><td><code>params</code></td><td><a href="http://www.boost.org/libs/preprocessor/doc/index.html">PP</a>-tuple of the metafunction's parameter names, in their original order. </td></tr>
</table>
<p>
<h3>Example</h3>
<p>
<pre>
template&lt; typename T, typename U = int &gt; struct f
{
typedef T type[sizeof(U)];
<p>
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,f,(T,U))
};
<p>
typedef lambda&lt; f&lt;char,_1&gt; &gt;::type f_; <span class="cxx-comment">// use f in a lambda expression</span>
typedef apply1&lt;f_,long&gt;::type res;
BOOST_MPL_ASSERT_IS_SAME(res, char[sizeof(long)]);
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Macros.html">Macros</a>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited November 12, 2003 1:29 am</body></html>
+5 -5
View File
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical and</em> (<code>&amp;&amp;</code
<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 and_&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>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> are not evaluated.</td><td></td></tr>
<tr><td><code>and_&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>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> 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((and_&lt; true_,false_ &gt;::type::value == false));
BOOST_STATIC_ASSERT((and_&lt; false_,fail&lt;int&gt; &gt;::type::value == false)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_,fail&lt;int&gt; &gt;::type::value == false)); <span class="cxx-comment">// OK too</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_ &gt;::value == false));
BOOST_STATIC_ASSERT((and_&lt; false_,fail&lt;int&gt; &gt;::value == false)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_,fail&lt;int&gt; &gt;::value == false)); <span class="cxx-comment">// OK too</span>
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/or.html">or_</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:21 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:13 am</body></html>
+2 -2
View File
@@ -51,8 +51,8 @@ Linear. Exactly <code><a href="../Reference/size.html">size</a>&lt;Sequence&gt;:
typedef <a href="../Reference/vector_c.html">vector_c</a>&lt;int,0,1,2,3,4,5,6,7,8,9&gt; numbers;
typedef copy&lt;
<a href="../Reference/range_c.html">range_c</a>&lt;int,10,20&gt;
, <a href="../Reference/push_back.html">push_back</a>&lt;_,_&gt;
, numbers
, <a href="../Reference/push_back.html">push_back</a>&lt;_,_&gt;
&gt;::type result;
<p>
BOOST_STATIC_ASSERT(<a href="../Reference/size.html">size</a>&lt;result&gt;::value == 20);
@@ -67,4 +67,4 @@ BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a>&lt; result,<a h
<p>
<a href="../Algorithms.html">Algorithms</a>, <code><a href="../Reference/copy_if.html">copy_if</a></code>, <code><a href="../Reference/copy_backward.html">copy_backward</a></code>, <code><a href="../Reference/copy_backward_if.html">copy_backward_if</a></code>, <code><a href="../Reference/fold.html">fold</a></code>, <code><a href="../Reference/fold_backward.html">fold_backward</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 19, 2002 2:10 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited May 20, 2003 1:36 am</body></html>
+59
View File
@@ -0,0 +1,59 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::is_sequence</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>is_sequence</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename T
&gt;
struct is_sequence
{
typedef <em>unspecified</em> type;
};
</pre>
<p>
<h3>Description</h3>
<p>
Returns an <a href="../Integral_Constant.html">Integral Constant</a> <code>c</code> such that <code>c::value == true</code> if and only if <code>T</code> is a model of <a href="../Sequence.html">Sequence</a>.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/is_sequence.hpp">boost/mpl/is_sequence.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>T</code></td><td>A type</td><td></td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<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 is_sequence&lt;T&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef <a href="../Reference/not.html">not_</a>&lt; is_same&lt; <a href="../Reference/begin.html">begin</a>&lt;T&gt;::type,void_ &gt; &gt;::type c;</code></td><td></td></tr>
</table>
<p>
<p>
<h3>Complexity</h3>
<p>
Amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
struct UDT {};
BOOST_STATIC_ASSERT( !is_sequence&lt;int&gt;::value );
BOOST_STATIC_ASSERT( !is_sequence&lt;UDT&gt;::value );
BOOST_STATIC_ASSERT( is_sequence&lt; <a href="../Reference/list.html">list</a>&lt;&gt; &gt;::value );
BOOST_STATIC_ASSERT( is_sequence&lt; <a href="../Reference/vector.html">vector</a>&lt;&gt; &gt;::value );
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Sequence.html">Sequence</a>, <code><a href="../Reference/begin.html">begin</a></code>, <code><a href="../Reference/end.html">end</a></code>, <code>as_sequence</code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 1, 2003 4:08 pm</body></html>
+4 -4
View File
@@ -34,18 +34,18 @@ Returns the result of <em>logical not</em> (<code>!</code>) operation on its arg
<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 not_&lt;f&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef bool_&lt;(!f::type::value)&gt; c;</code></td><td></td></tr>
<tr><td><code>not_&lt;f&gt;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>bool_&lt;(!f::type::value)&gt;</code></td><td></td></tr>
</table>
<p>
<h3>Example</h3>
<p>
<pre>
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::type::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::type::value == true);
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::value == true);
</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/or.html">or_</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:19 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:09 am</body></html>
+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>
+72
View File
@@ -0,0 +1,72 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::rational_c</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>rational_c</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename IntegerType
, IntegerType N
, IntegerType D = 1
&gt;
struct rational_c
{
typedef rational_c&lt;IntegerType, N, D&gt; type;
typedef IntegerType integer_type;
typedef integral_c&lt;IntegerType,N&gt; numerator;
typedef integral_c&lt;IntegerType,D&gt; denominator;
<p>
static double value();
};
</pre>
<p>
<p>
<h3>Description</h3>
<p>
A model of <a href="../Rational_Constant.html">Rational Constant</a>.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/rational_c.hpp">boost/mpl/rational_c.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>IntegerType</code></td><td>An integral type</td><td>Type used to represent numerator and denominator. </td></tr>
<tr><td><code>N</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of numerator. </td></tr>
<tr><td><code>D</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of denominator. </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<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>rational_c&lt;T,n,d&gt;::value()</code></td><td><code>double</code></td><td><code>static_cast&lt;T&gt;(d) != 0</code></td><td>Returns <code>static_cast&lt;double&gt;(static_cast&lt;T&gt;(n)) / static_cast&lt;T&gt;(d)</code>.</td><td></td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
All operations take amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;int,1,2&gt; half;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;int,2,4&gt; half_2;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;long,9,15&gt; three_fiths_3;
typedef rational_plus&lt;three_fiths,half&gt;::type eleven_tenth;
typedef rational_plus&lt;half,half&gt;::type one;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;long,1,8&gt; eighth;
typedef rational_minus&lt;half,eighth&gt;::type three_eighths;
typedef rational_multiplies&lt;half,eighth&gt;::type sixteenth;
typedef rational_divides&lt;eighth,half&gt;::type quarter;
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Rational_Constant.html">Rational Constant</a>, <a href="../Integral_Constant.html">Integral Constant</a>, <code>integral_c</code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited October 30, 2003 2:44 am</body></html>