update reference docs
[SVN r20792]
This commit is contained in:
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> Parameter </th><th> Description </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< typename T, typename U = int > struct f
|
||||
{
|
||||
typedef T type[sizeof(U)];
|
||||
<p>
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,f,(T,U))
|
||||
};
|
||||
<p>
|
||||
typedef lambda< f<char,_1> >::type f_; <span class="cxx-comment">// use f in a lambda expression</span>
|
||||
typedef apply1<f_,long>::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>
|
||||
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical and</em> (<code>&&</code
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef and_<f1,f2,..,fn>::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_<f1,f2,..,fn></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< typename T > struct fail
|
||||
typedef typename T::nonexistent type;
|
||||
};
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_ >::type::value == false));
|
||||
BOOST_STATIC_ASSERT((and_< false_,fail<int> >::type::value == false)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_,fail<int> >::type::value == false)); <span class="cxx-comment">// OK too</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_ >::value == false));
|
||||
BOOST_STATIC_ASSERT((and_< false_,fail<int> >::value == false)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_,fail<int> >::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>
|
||||
@@ -51,8 +51,8 @@ Linear. Exactly <code><a href="../Reference/size.html">size</a><Sequence>:
|
||||
typedef <a href="../Reference/vector_c.html">vector_c</a><int,0,1,2,3,4,5,6,7,8,9> numbers;
|
||||
typedef copy<
|
||||
<a href="../Reference/range_c.html">range_c</a><int,10,20>
|
||||
, <a href="../Reference/push_back.html">push_back</a><_,_>
|
||||
, numbers
|
||||
, <a href="../Reference/push_back.html">push_back</a><_,_>
|
||||
>::type result;
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT(<a href="../Reference/size.html">size</a><result>::value == 20);
|
||||
@@ -67,4 +67,4 @@ BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a>< 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>
|
||||
@@ -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<
|
||||
typename T
|
||||
>
|
||||
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> Parameter </th><th> Requirement </th><th> Description </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> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef is_sequence<T>::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>< is_same< <a href="../Reference/begin.html">begin</a><T>::type,void_ > >::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<int>::value );
|
||||
BOOST_STATIC_ASSERT( !is_sequence<UDT>::value );
|
||||
BOOST_STATIC_ASSERT( is_sequence< <a href="../Reference/list.html">list</a><> >::value );
|
||||
BOOST_STATIC_ASSERT( is_sequence< <a href="../Reference/vector.html">vector</a><> >::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>
|
||||
@@ -34,18 +34,18 @@ Returns the result of <em>logical not</em> (<code>!</code>) operation on its arg
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef not_<f>::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_<(!f::type::value)> c;</code></td><td></td></tr>
|
||||
<tr><td><code>not_<f></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_<(!f::type::value)></code></td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
BOOST_STATIC_ASSERT(not_<true_>::type::value == false);
|
||||
BOOST_STATIC_ASSERT(not_<false_>::type::value == true);
|
||||
BOOST_STATIC_ASSERT(not_<true_>::value == false);
|
||||
BOOST_STATIC_ASSERT(not_<false_>::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>
|
||||
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical or</em> (<code>||</code>) operat
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef or_<f1,f2,..,fn>::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_<f1,f2,..,fn></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< typename T > struct fail
|
||||
typedef typename T::nonexistent type;
|
||||
};
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_ >::type::value == true));
|
||||
BOOST_STATIC_ASSERT((or_< true_,fail<int> >::type::value == true)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_,fail<int> >::type::value == true)); <span class="cxx-comment">// OK too</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_ >::value == true));
|
||||
BOOST_STATIC_ASSERT((or_< true_,fail<int> >::value == true)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_,fail<int> >::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>
|
||||
@@ -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<
|
||||
typename IntegerType
|
||||
, IntegerType N
|
||||
, IntegerType D = 1
|
||||
>
|
||||
struct rational_c
|
||||
{
|
||||
typedef rational_c<IntegerType, N, D> type;
|
||||
typedef IntegerType integer_type;
|
||||
typedef integral_c<IntegerType,N> numerator;
|
||||
typedef integral_c<IntegerType,D> 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> Parameter </th><th> Requirement </th><th> Description </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> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>rational_c<T,n,d>::value()</code></td><td><code>double</code></td><td><code>static_cast<T>(d) != 0</code></td><td>Returns <code>static_cast<double>(static_cast<T>(n)) / static_cast<T>(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><int,1,2> half;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><int,2,4> half_2;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><long,9,15> three_fiths_3;
|
||||
typedef rational_plus<three_fiths,half>::type eleven_tenth;
|
||||
typedef rational_plus<half,half>::type one;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><long,1,8> eighth;
|
||||
typedef rational_minus<half,eighth>::type three_eighths;
|
||||
typedef rational_multiplies<half,eighth>::type sixteenth;
|
||||
typedef rational_divides<eighth,half>::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>
|
||||
Reference in new issue
Block a user