mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-04 07:14:30 +02:00
This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17837]
This commit is contained in:
19
doc/ref/Integral_constant_classes.html
Normal file
19
doc/ref/Integral_constant_classes.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::Integral constant classes</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>Integral constant classes</h1><h4>Concepts</h4>
|
||||
<ul>
|
||||
<li><a href="./Integral_Constant.html">Integral Constant</a>
|
||||
</ul>
|
||||
<p>
|
||||
<h4>Types</h4>
|
||||
<ul>
|
||||
<li>integral_c
|
||||
<li>bool_
|
||||
<li>int_
|
||||
<li>long_
|
||||
<li>size_t
|
||||
</ul>
|
||||
<p><hr>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:34 am</body></html>
|
67
doc/ref/Metafunction_Class.html
Normal file
67
doc/ref/Metafunction_Class.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::Metafunction Class</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>Metafunction Class</h1><h3>Description</h3>
|
||||
<p>
|
||||
A <em>metafunction class</em> is a certain form of metafunction representation that enables higher-order metaprogramming. In particular, a non-nullary metafunction class is a type with a nested class template member <code>apply</code>. A nullary metafunction class has the form of a <a href="./Metafunction.html">nullary metafunction</a>. A metafunction class invocation is defined as invocation of its nested <code>apply</code> <a href="./Metafunction.html">metafunction</a>.
|
||||
<p>
|
||||
<h3>Valid expressions</h3>
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th></tr>
|
||||
<tr><td><code>typename f::type</code></td><td>A type </td></tr>
|
||||
<tr><td><code>typename f::template apply<a1,..,an>::type</code></td><td>A type </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Expression semantics</h3>
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Complexity </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typename f::type</code></td><td>unspecified</td><td><code>f</code> is a nullary metafunction class; <code>f::type</code> is a <em>type-name</em></td><td><code>f::type</code> is the result of the metafunction class invocation</td><td></td></tr>
|
||||
<tr><td><code>typename f::template apply<a1,..,an>::type</code></td><td>unspecified</td><td><code>f</code> is an <code>n</code>-ary metafunction class; <code>apply</code> is a <a href="./Metafunction.html">metafunction</a></td><td><code>typename f::template apply<a1,..,an>::type</code> is the result of the metafunction class invocation with the actual arguments <code>a1,..,an</code></td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
<span class="cxx-comment">// nullary metafunction class</span>
|
||||
struct always_true { typedef true_ type; };
|
||||
<p>
|
||||
template< long N > struct le
|
||||
{
|
||||
template< typename M > struct apply
|
||||
{
|
||||
typedef bool_< (M::value < N) > type;
|
||||
};
|
||||
};
|
||||
<p>
|
||||
<span class="cxx-comment">// unary metafunction class</span>
|
||||
typedef le<5> less_than_5;
|
||||
<p>
|
||||
<span class="cxx-comment">// binary metafunction class</span>
|
||||
struct less_than
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
{
|
||||
typedef bool_< (N1::value < N2::value) > type;
|
||||
};
|
||||
};
|
||||
<p>
|
||||
<span class="cxx-comment">// invocations</span>
|
||||
typedef always_true::type t1;
|
||||
typedef less_than_5::apply< int_<7> >::type t2;
|
||||
typedef less_than::apply< int_<5>,int_<7> >::type t3;
|
||||
<p>
|
||||
<span class="cxx-comment">// results checks</span>
|
||||
BOOST_STATIC_ASSERT(t1::value);
|
||||
BOOST_STATIC_ASSERT(!t2::value);
|
||||
BOOST_STATIC_ASSERT(t3::value);
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="./Metafunctions.html">Metafunctions</a>, <a href="./Metafunction.html">Metafunction</a>
|
||||
<p><hr>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 4:16 am</body></html>
|
62
doc/ref/Reference/and.html
Normal file
62
doc/ref/Reference/and.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::and_</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>and_</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename F1
|
||||
, typename F2
|
||||
, typename F3 = true_
|
||||
...
|
||||
, typename Fn = true_
|
||||
>
|
||||
struct and_
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Returns the result of short-circuit <em>logical and</em> (<code>&&</code>) operation on its arguments.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/and.hpp">boost/mpl/and.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>F1, F2, .., Fn</code></td><td>A model of nullary <a href="../Metafunction.html">Metafunction</a></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 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>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
<span class="cxx-comment">// will generate compile-time error if invoked with T == any fundamental type</span>
|
||||
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>
|
||||
</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>
|
56
doc/ref/Reference/deref.html
Normal file
56
doc/ref/Reference/deref.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::deref</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>deref</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename Iterator
|
||||
>
|
||||
struct deref
|
||||
{
|
||||
typedef typename Iterator::type type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Dereferences an iterator.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/deref.hpp">boost/mpl/deref.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>Iterator</code></td><td>A model of <a href="../Trivial_Iterator.html">Trivial Iterator</a></td><td>An iterator to be dereferenced. </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 deref<Iterator>::type t;</code></td><td>A type</td><td></td><td>Equivalent to <code>typedef Iterator::type t;</code>.</td><td><code>Iterator</code> is dereferenceable </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef <a href="../Reference/list.html">list</a><char,short,int,long> types;
|
||||
typedef <a href="../Reference/begin.html">begin</a><types>::type iter;
|
||||
BOOST_STATIC_ASSERT(boost::is_same< deref<iter>::type,char >::value));
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Iterators.html">Iterators</a>, <code><a href="../Reference/begin.html">begin</a>/<a href="../Reference/end.html">end</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:30 am</body></html>
|
61
doc/ref/Reference/joint_view.html
Normal file
61
doc/ref/Reference/joint_view.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::joint_view</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>joint_view</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename Sequence1
|
||||
, typename Sequence2
|
||||
>
|
||||
struct joint_view
|
||||
{
|
||||
<span class="cxx-comment">// unspecified</span>
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
<code>joint_view</code> is a two-sequence view that allows one to operate on a sequence of concatenated elements of sequences <code>Sequence1</code> and <code>Sequence2</code> without actually creating one.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/joint_view.hpp">boost/mpl/joint_view.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>Sequence1</code>, <code>Sequence2</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td>Sequences to concatenate. </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 joint_view<Sequence1,Sequence2> s;</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td></td><td><code>s</code> prodives iterators to all the elements in the ranges <code>[<a href="../Reference/begin.html">begin</a><Sequence1>::type,<a href="../Reference/end.html">end</a><Sequence1>::type)</code>, <code>[<a href="../Reference/begin.html">begin</a><Sequence2>::type,<a href="../Reference/end.html">end</a><Sequence2>::type)</code>.</td><td><code><a href="../Reference/size.html">size</a><s>::type::value == <a href="../Reference/size.html">size</a>< Sequence1 >::type::value + <a href="../Reference/size.html">size</a>< Sequence2 >::type::value</code>. </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef joint_view<
|
||||
<a href="../Reference/range_c.html">range_c</a><int,0,10>
|
||||
, <a href="../Reference/range_c.html">range_c</a><int,10,15>
|
||||
> numbers;
|
||||
<p>
|
||||
typedef <a href="../Reference/range_c.html">range_c</a><int,0,15> answer;
|
||||
BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a><numbers,answer>::type::value));
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Sequences.html">Sequences</a>, <code><a href="../Reference/transform_view.html">transform_view</a></code>, <code><a href="../Reference/filter_view.html">filter_view</a></code>, <code><a href="../Reference/zip_view.html">zip_view</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:42 am</body></html>
|
62
doc/ref/Reference/max_element.html
Normal file
62
doc/ref/Reference/max_element.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::max_element</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>max_element</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Pred = <a href="../Reference/less.html">less</a><_1,_2>
|
||||
>
|
||||
struct max_element
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Finds the largest element in the <code>Sequence</code>.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/max_element.hpp">boost/mpl/max_element.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>Sequence</code></td><td>A model of <a href="../Forward_Sequence.html">Forward Sequence</a></td><td>A sequence to be searched. </td></tr>
|
||||
<tr><td><code>Pred</code></td><td>A model of binary Predicate [Lambda Expression]</td><td>A comparison criteria. </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 max_element< Sequence,Pred >::type i;</code></td><td>A model of <a href="../Forward_Iterator.html">Forward Iterator</a></td><td></td><td><code>i</code> is the first iterator in <code>[begin<Sequence>::type, end<Sequence>::type)</code> such that for every iterator <code>j</code> in <code>[begin<Sequence>::type, end<Sequence>::type)</code>, <code>apply< lambda<Pred>::type, i::type, j::type >::type::value == false</code>.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Linear. Zero comparisons if <code>Sequence</code> is empty, otherwise exactly <code>size<Sequence>::value - 1</code> comparisons.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef <a href="../Reference/vector.html">vector</a><int,char[50],long,double> types;
|
||||
typedef max_element<
|
||||
<a href="../Reference/transform_view.html">transform_view</a>< types,sizeof_<_1> >
|
||||
>::type iter;
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((<a href="../Reference/distance.html">distance</a>< begin<types>::type,iter >::type::value == 1));
|
||||
BOOST_STATIC_ASSERT(sizeof(<a href="../Reference/deref.html">deref</a><iter>::type) == 50);
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Algorithms.html">Algorithms</a>, <code><a href="../Reference/min_element.html">min_element</a></code>, <code><a href="../Reference/upper_bound.html">upper_bound</a></code>, <code><a href="../Reference/lower_bound.html">lower_bound</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 6:01 am</body></html>
|
62
doc/ref/Reference/min_element.html
Normal file
62
doc/ref/Reference/min_element.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::min_element</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>min_element</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Pred = <a href="../Reference/less.html">less</a><_1,_2>
|
||||
>
|
||||
struct min_element
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Finds the smallest element in the <code>Sequence</code>.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/min_element.hpp">boost/mpl/min_element.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>Sequence</code></td><td>A model of <a href="../Forward_Sequence.html">Forward Sequence</a></td><td>A sequence to be searched. </td></tr>
|
||||
<tr><td><code>Pred</code></td><td>A model of binary Predicate [Lambda Expression]</td><td>A comparison criteria. </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 min_element< Sequence,Pred >::type i;</code></td><td>A model of <a href="../Forward_Iterator.html">Forward Iterator</a></td><td></td><td><code>i</code> is the first iterator in <code>[begin<Sequence>::type, end<Sequence>::type)</code> such that for every iterator <code>j</code> in <code>[begin<Sequence>::type, end<Sequence>::type)</code>, <code>apply< lambda<Pred>::type, j::type, i::type >::type::value == false</code>.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Linear. Zero comparisons if <code>Sequence</code> is empty, otherwise exactly <code>size<Sequence>::value - 1</code> comparisons.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef <a href="../Reference/vector.html">vector</a><bool,char[50],long,double> types;
|
||||
typedef min_element<
|
||||
<a href="../Reference/transform_view.html">transform_view</a>< types,sizeof_<_1> >
|
||||
>::type iter;
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((<a href="../Reference/distance.html">distance</a>< begin<types>::type,iter >::type::value == 0));
|
||||
BOOST_STATIC_ASSERT(sizeof(<a href="../Reference/deref.html">deref</a><iter>::type) == sizeof(bool));
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Algorithms.html">Algorithms</a>, <code><a href="../Reference/max_element.html">max_element</a></code>, <code><a href="../Reference/upper_bound.html">upper_bound</a></code>, <code><a href="../Reference/lower_bound.html">lower_bound</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 6:05 am</body></html>
|
51
doc/ref/Reference/not.html
Normal file
51
doc/ref/Reference/not.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::not_</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>not_</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct not_
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Returns the result of <em>logical not</em> (<code>!</code>) operation on its argument.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/not.hpp">boost/mpl/not.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>F</code></td><td>A model of nullary <a href="../Metafunction.html">Metafunction</a></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 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>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
BOOST_STATIC_ASSERT(not_<true_>::type::value == false);
|
||||
BOOST_STATIC_ASSERT(not_<false_>::type::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>
|
62
doc/ref/Reference/or.html
Normal file
62
doc/ref/Reference/or.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::or_</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>or_</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename F1
|
||||
, typename F2
|
||||
, typename F3 = false_
|
||||
...
|
||||
, typename Fn = false_
|
||||
>
|
||||
struct or_
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Returns the result of short-circuit <em>logical or</em> (<code>||</code>) operation on its arguments.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/or.hpp">boost/mpl/or.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>F1, F2, .., Fn</code></td><td>A model of nullary <a href="../Metafunction.html">Metafunction</a></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 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>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
<span class="cxx-comment">// will generate compile-time error if invoked with T == any fundamental type</span>
|
||||
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>
|
||||
</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>
|
62
doc/ref/Reference/single_view.html
Normal file
62
doc/ref/Reference/single_view.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::single_view</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>single_view</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
struct single_view
|
||||
{
|
||||
<span class="cxx-comment">// unspecified</span>
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Allows one to represent an arbitrary type <code>T</code> as a single-element sequence.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/single_view.hpp">boost/mpl/single_view.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>The type to be wrapped in a sequence. </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 single_view<T> s;</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td></td><td><code>s</code> is a random-access, single-element sequence such as <code><a href="../Reference/front.html">front</a><s>::type</code> is identical to <code>T</code></td><td><code><a href="../Reference/size.html">size</a><s>::type::value == 1, boost::same_as<<a href="../Reference/front.html">front</a><s>::type,T>::value == true</code>. </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef single_view<int> view;
|
||||
typedef <a href="../Reference/begin.html">begin</a><view>::type first;
|
||||
typedef <a href="../Reference/end.html">end</a><view>::type last;
|
||||
<p>
|
||||
BOOST_MPL_ASSERT_IS_SAME(first::type,int);
|
||||
BOOST_MPL_ASSERT_IS_SAME(first::next,last);
|
||||
BOOST_MPL_ASSERT_IS_SAME(last::prior,first);
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT(size<view>::type::value == 1);
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Sequences.html">Sequences</a>, <code><a href="../Reference/transform_view.html">transform_view</a></code>, <code><a href="../Reference/filter_view.html">filter_view</a></code>, <code><a href="../Reference/joint_view.html">joint_view</a></code>, <code><a href="../Reference/zip_view.html">zip_view</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:19 am</body></html>
|
66
doc/ref/Reference/zip_view.html
Normal file
66
doc/ref/Reference/zip_view.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::zip_view</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>zip_view</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename Sequences
|
||||
>
|
||||
struct zip_view
|
||||
{
|
||||
<span class="cxx-comment">// unspecified</span>
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
<code>zip_view</code> provides a "zipped" view onto several sequences; that is, it allows to represent several sequences as a single sequence of elements each of those, in its turn, is a sequence of the corresponding <code>Sequences</code> elements.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/zip_view.hpp">boost/mpl/zip_view.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>Sequences</code></td><td>A <a href="../Sequence.html">Sequence</a> of <a href="../Sequence.html">Sequence</a>s</td><td>Sequences to be "zipped". </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 zip_view<Sequences> s;</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td></td><td><code>s</code> is a sequence such that for each <code>i</code> in <code>[<a href="../Reference/begin.html">begin</a><s>::type, <a href="../Reference/end.html">end</a><s>::type)</code> and for each <code>j</code> in <code>[<a href="../Reference/begin.html">begin</a><Sequences>::type, <a href="../Reference/end.html">end</a><Sequences>::type)</code> <code>i::type</code> is identical to <code><a href="../Reference/transform.html">transform</a><j::type, <a href="../Reference/deref.html">deref</a><_1> >::type </code>.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef <a href="../Reference/range_c.html">range_c</a><int,0,10> s1;
|
||||
typedef range_c<int,10,20> s2;
|
||||
<p>
|
||||
typedef <a href="../Reference/transform_view.html">transform_view</a><
|
||||
<a href="../Reference/zip_view.html">zip_view</a>< <a href="../Reference/list.html">list</a><s1,s2> >
|
||||
, apply_seq< <a href="../Reference/plus.html">plus</a><_1,_2> >
|
||||
> result;
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((equal<
|
||||
result
|
||||
, <a href="../Reference/filter_view.html">filter_view</a>< range_c<int,10,30>, math::is_even<_1> >
|
||||
, <a href="../Reference/equal_to.html">equal_to</a><_1,_2>
|
||||
>::type::value));
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Sequences.html">Sequences</a>, <code><a href="../Reference/transform_view.html">transform_view</a></code>, <code><a href="../Reference/filter_view.html">filter_view</a></code>, <code><a href="../Reference/joint_view.html">joint_view</a></code>, <code><a href="../Reference/equal.html">equal</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:04 am</body></html>
|
15
doc/ref/Table_of_Contents.html
Normal file
15
doc/ref/Table_of_Contents.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::Table of Contents</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>Table of Contents</h1><ol>
|
||||
<li><a href="./Sequences.html">Sequences</a>
|
||||
<li><a href="./Iterators.html">Iterators</a>
|
||||
<li><a href="./Algorithms.html">Algorithms</a>
|
||||
<li><a href="./Metafunctions.html">Metafunctions</a>
|
||||
<li><a href="./Integral_constant_classes.html">Integral constant classes</a>
|
||||
<li><a href="./Categorized_index.html">Categorized index</a>
|
||||
<li><a href="./Acknowledgements.html">Acknowledgements</a>
|
||||
</ol>
|
||||
<p><hr>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:32 am</body></html>
|
Reference in New Issue
Block a user