Compare commits

..
Author SHA1 Message Date
nobody 5f3190f36a This commit was manufactured by cvs2svn to create tag
'Version_1_30_2'.

[SVN r19685]
2003-08-18 18:40:31 +00:00
Dave Abrahams 1672ca2d75 merged from trunk
[SVN r18070]
2003-03-24 02:13:22 +00:00
Aleksey Gurtovoy fb752638c9 merge fixes from the main trunk
[SVN r17888]
2003-03-13 12:34:25 +00:00
Aleksey Gurtovoy 1ab158cda0 merge fixes from the main trunk
[SVN r17886]
2003-03-13 12:13:40 +00:00
nobody 3d325c7333 This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17837]
2003-03-12 13:29:13 +00:00
nobody ae4caa5180 This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17826]
2003-03-12 01:39:29 +00:00
Aleksey Gurtovoy a44a73551f SGI MIPSpro fix
[SVN r17780]
2003-03-08 07:10:07 +00:00
Ralf W. Grosse-Kunstleve 3be28cb1b0 MIPSpro compatibility
[SVN r17776]
2003-03-08 01:47:40 +00:00
nobody 5a797f50bb This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17693]
2003-03-01 19:43:06 +00:00
250 changed files with 2308 additions and 7245 deletions
+6 -10
View File
@@ -1,15 +1,11 @@
@echo off
if "%3" == "" goto usage
if "%4" == "" goto build
f:\msxsl\msxsl.exe f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\titlepage.templates.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.52.2\template\titlepage.xsl | f:\msxsl\msxsl.exe - f:\msxsl\to_utf8.xsl -o f:\home\depot\xml\stylesheets\docbook-1.50.0\html\titlepage.templates.xsl
:build
sx -x lower -x empty %2 >%3.xml
msxsl.exe %3.xml ..\..\..\..\..\docbook-xsl-1.50.0\html\my\%1 -o %3
f:\msxsl\msxsl.exe %3.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\my\%1 -o %3
del %3.xml
tidy.exe -config tidy_config -m %3
python tidy_attr.py %3
exit
:usage
echo Usage examples:
echo msxsl_build.bat docbook_msxsl.xsl src\body.sgml index.html
echo msxsl_build.bat docbook_msxsl.xsl paper\src\body.sgml paper\mpl_paper.html
f:\tidy\tidy.exe -config f:\tidy\config.txt -m %3
f:\tidy\tidy_attr.py %3
+11
View File
@@ -0,0 +1,11 @@
@echo off
if "%4" == "" goto build
f:\msxsl\msxsl.exe f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\titlepage.templates.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.52.2\template\titlepage.xsl | f:\msxsl\msxsl.exe - f:\msxsl\to_utf8.xsl -o f:\home\depot\xml\stylesheets\docbook-1.50.0\html\titlepage.templates.xsl
:build
sx -x lower -x empty %2 >%3.xml
f:\msxsl\msxsl.exe %3.xml f:\home\depot\xml\stylesheets\docbook-xsl-1.50.0\html\my\%1 -o %3
del %3.xml
f:\tidy\tidy.exe -config f:\tidy\config.txt -m %3
f:\tidy\tidy_attr.py %3
+3 -3
View File
@@ -29,7 +29,7 @@ However, this model is far too limiting: it restricts the metafunction result no
template< typename T1, typename T2 >
struct derive
{
struct type : T1, T2 {};
struct type : N1, N2 {};
};
// silly specialization, but demonstrates "returning" int
@@ -58,7 +58,7 @@ While syntactically simple, the simple template metafunction form does not alway
<![CDATA[
// returns F(T1,F(T2,T3))
template<
template<typename,typename> class F
template<typename> class F
, typename T1
, typename T2
, typename T3
@@ -94,7 +94,7 @@ However, things begin to break down noticeably when we want to <quote>return</>
<programlisting>
<![CDATA[
// returns G s.t. G(T1,T2,T3) == F(T1,F(T2,T3))
template< template<typename,typename> class F >
template< template<typename> class F >
struct compose_self
{
template<
-18
View File
@@ -1,18 +0,0 @@
To re-generate the docs in the exact format as they appear here, you would
need a slightly tweaked DocBook XSLT stylesheets disrtibution available at
http://www.mywikinet.com/mpl/docbook-xsl-1.50.0.zip
If you are to use the build scripts as-is, you also need these tools:
sx - an SGML to XML convertor, a part of James Clark's SP package,
available at http://www.jclark.com/sp/
msxsl - Microsoft XSLT processor, available at
http://msdn.microsoft.com/library/en-us/dnxml/html/msxsl.asp
tidy - http://tidy.sourceforge.net/
Python - to be able to run 'tidy_attr.py',
available at http://www.python.org or
http://www.activestate.com/Products/ActivePython/
+1 -1
View File
@@ -2,6 +2,6 @@
<html><head><title>boost::mpl::Acknowledgements</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>Acknowledgements</h1>The format and language of this reference documentation has been greatly influenced by the SGI's <a href="http://www.sgi.com/tech/stl/">Standard Template Library Programmer's Guide</a>.
<h1><a href="./Table_of_Contents.html"><img src="./mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>Acknowledgements</h1>The format and language of this reference documentation has been greatly influenced by the SGI's <a href="http://www.sgi.com/tech/stl/">[Standard Template Library Programmer's Guide]</a>.
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 17, 2002 9:04 am</body></html>
-58
View File
@@ -1,58 +0,0 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Associative 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>Associative Sequence</h1><h3>Description</h3>
<p>
An Associative Sequence is a <a href="./Sequence.html">Sequence</a> which allows efficient retrieval of elements based on keys. For some of associative sequences such as <code>set</code> it is guaranteed that no two elements have the same key. Others, such as <code>multiset</code>, allow multiple elements with the same key.
<p>
<h3>Refinement of</h3>
<p>
<a href="./Sequence.html">Sequence</a>
<p>
<h3>Valid expressions</h3>
<p>
In addition to <a href="./Sequence.html">Sequence</a>'s expressions the following expressions are valid.
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>A model of boolean <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> or <code>void_</code> </td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>A type </td></tr>
<tr><td><code>at&lt;s,k,default&gt;::type</code></td><td>A type </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
</table>
<p>
<p>
<h3>Invariants</h3>
<p>
For any associative sequence <code>s</code> the following invariants always hold:
<ul>
<li>TODO
</ul>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code>set</code>
<li><code>map</code>
<li><code>set_c</code>
</ul>
<p>
<h3>Notes</h3>
<p>
<h3>See also</h3>
<p>
<a href="./Sequences.html">Sequences</a>, <a href="./Forward_Sequence.html">Forward Sequence</a>, <a href="./Extensible_Associative_Sequence.html">Extensible Associative Sequence</a>,
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited October 25, 2003 7:40 am</body></html>
@@ -1,47 +0,0 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Extensible Associative 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>Extensible Associative Sequence</h1><h3>Description</h3>
<p>
An Extensible Associative Sequence is an <a href="./Associative_Sequence.html">Associative Sequence</a> that supports insertion and removal of elements. In contrast to <a href="./Extensible_Sequence.html">Extensible Sequence</a>, Extensible Associative Sequence does not provide a mechanism for inserting an element <em>at a specific position</em>.
<p>
Refinement of
<p>
<a href="./Associative_Sequence.html">Associative Sequence</a>
<p>
<h3>Valid expressions</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>typename clear&lt;s&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,t&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename remove&lt;s,k&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
TODO.
<p>
<h3>Invariants</h3>
<p>
For any associative sequence <code>s</code> the following invariants always hold:
<ul>
<li>TODO
</ul>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code>set</code>
<li><code>map</code>
<li><code>set_c</code>
</ul>
<p>
<h3>Notes</h3>
<p>
<h3>See also</h3>
<p>
<a href="./Sequences.html">Sequences</a>, <a href="./Forward_Sequence.html">Forward Sequence</a>, <a href="./Associative_Sequence.html">Associative Sequence</a>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited May 2, 2003 8:24 am</body></html>
+2 -2
View File
@@ -15,7 +15,7 @@ An Extensible Sequence is either a <a href="./Forward_Sequence.html">Forward Seq
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>typename clear&lt;s&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,pos,t&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,pos,T&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename erase&lt;s,pos&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename erase&lt;s,first,last&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
</table>
@@ -37,4 +37,4 @@ See the description of <a href="./Reference/clear.html">clear</a>, <a href="./Re
<p>
<a href="./Sequences.html">Sequences</a>, <code><a href="./Reference/clear.html">clear</a></code>, <code><a href="./Reference/insert.html">insert</a></code>, <code><a href="./Reference/erase.html">erase</a></code>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited May 2, 2003 4:54 am</body></html>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 16, 2002 6:27 pm</body></html>
+2 -2
View File
@@ -16,7 +16,7 @@ An Input Iterator is a <a href="./Trivial_Iterator.html">Trivial Iterator</a> th
<li>an input iterator is <em>past-the-end</em> if it points beyond the last element of a sequence; past-the-end iterators are non-dereferenceable;
<li>an input iterator is <em>valid</em> if it is dereferenceable or past-the-end;
<li>an input iterator <code>i</code> is <em>incrementable</em> if there is a "next" iterator, that is, if <code>i::next</code> expression is well-defined; past-the-end iterators are not incrementable;
<li>an input iterator <code>j</code> is <em>reachable</em> from an input iterator <code>i</code> if, after recursive application of <code>next</code> operation to <code>i</code> a finite number of times, <code>i</code> is identical to <code>j</code>;
<li>an input iterator <code>j</code> is <em>reachable</em> from a forward iterator <code>i</code> if, after recursive application of <code>next</code> operation to <code>i</code> a finite number of times, <code>i</code> is identical to <code>j</code>;
<li>the notation <code>[i,j)</code> refers to a <em>range</em> of iterators beginning with <code>i</code> and up to but not including <code>j</code>;
<li>the range <code>[i,j)</code> is a <em>valid range</em> if both <code>i</code> and <code>j</code> are valid iterators, and <code>j</code> is reachable from <code>i</code>.
</ul>
@@ -41,4 +41,4 @@ In addition to the expressions defined in <a href="./Trivial_Iterator.html">Triv
<p>
<a href="./Sequence.html">Sequence</a>, <a href="./Trivial_Iterator.html">Trivial Iterator</a>, <a href="./Forward_Iterator.html">Forward Iterator</a>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited April 21, 2003 4:14 pm</body></html>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 15, 2002 10:48 am</body></html>
-24
View File
@@ -1,24 +0,0 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Macros</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>Macros</h1><h4>Introspection</h4>
<ul>
<li>BOOST_MPL_HAS_XXX
</ul>
<p>
<h4>Configuration</h4>
<ul>
<li>BOOST_MPL_NO_PREPROCESSED_HEADERS
<li>BOOST_MPL_METAFUNCTION_MAX_ARITY
<li>BOOST_MPL_LIMIT_LIST_SIZE
<li>BOOST_MPL_LIMIT_VECTOR_SIZE
<li>BOOST_MPL_UNROLLING_LIMIT
</ul>
<p>
<h4>Broken compilers workarounds </h4>
<ul>
<li><a href="./Reference/BOOST_MPL_AUX_LAMBDA_SUPPORT.html">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>
</ul>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited November 12, 2003 1:35 am</body></html>
-37
View File
@@ -1,37 +0,0 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Rational Constant</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 Constant</h1><h3>Description</h3>
<p>
A Rational Constant is a class representing the ration of two values of a built-in integral type (<code>bool</code>, <code>int</code>, <code>long</code>, etc.) in compile-time programs. A rational constant directly supports access to the numerator
and denominator. Other arithmetic operations are supported through the external metafunctions. A rational constant is always stored in simplified form.
<p>
<h3>Valid expressions</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Return type &nbsp;</th></tr>
<tr><td><code>typename n::integer_type</code></td><td>An <em>integral type</em> </td></tr>
<tr><td><code>typename n::type</code></td><td>A model of <a href="./Rational_Constant.html">Rational Constant</a> </td></tr>
<tr><td><code>typename n::numerator</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> representing the numerator </td></tr>
<tr><td><code>typename n::denominator</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> representing the denominator </td></tr>
<tr><td><code>n::value()</code></td><td>A run-time floating point approximation of <code>n::type</code> </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
</table>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code><a href="./Reference/rational_c.html">rational_c</a></code>
</ul>
<p>
<h3>See also</h3>
<p>
<a href="./Integral_Constant.html">Integral Constant</a>, <code><a href="./Reference/rational_c.html">rational_c</a></code>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited October 30, 2003 2:43 am</body></html>
@@ -1,50 +0,0 @@
<!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>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>
<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>
</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;::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>
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>
</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 September 6, 2003 3:13 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:21 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;
, numbers
, <a href="../Reference/push_back.html">push_back</a>&lt;_,_&gt;
, numbers
&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 May 20, 2003 1:36 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 19, 2002 2:10 am</body></html>
-59
View File
@@ -1,59 +0,0 @@
<!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>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>
<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>
</table>
<p>
<h3>Example</h3>
<p>
<pre>
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::value == true);
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::type::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::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 September 6, 2003 3:09 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:19 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>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>
<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>
</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;::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>
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>
</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 September 6, 2003 3:14 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:18 am</body></html>
-72
View File
@@ -1,72 +0,0 @@
<!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/math/rational_c.hpp">boost/mpl/math/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>
+3 -14
View File
@@ -11,11 +11,6 @@
<li><a href="./Extensible_Sequence.html">Extensible Sequence</a>
</ul>
<p>
<ul>
<li><a href="./Associative_Sequence.html">Associative Sequence</a>
<li><a href="./Extensible_Associative_Sequence.html">Extensible Associative Sequence</a>
</ul>
<p>
<h4>Classes</h4>
<ul>
<li><a href="./Reference/vector.html">vector</a>
@@ -25,12 +20,6 @@
<li><a href="./Reference/range_c.html">range_c</a>
</ul>
<p>
<ul>
<li>set
<li>map
<li>set_c
</ul>
<p>
<h4>Views</h4>
<ul>
<li><a href="./Reference/transform_view.html">transform_view</a>
@@ -41,10 +30,10 @@
<li>as_sequence
</ul>
<p>
<h4>Intrinsic Metafunctions</h4>
<h4>Metafunctions</h4>
<ul>
<li><a href="./Reference/begin.html">begin</a>/<a href="./Reference/end.html">end</a>
<li><a href="./Reference/is_sequence.html">is_sequence</a>
<li>is_sequence
<li><a href="./Reference/size.html">size</a>
<li><a href="./Reference/empty.html">empty</a>
<li><a href="./Reference/front.html">front</a>
@@ -61,4 +50,4 @@
</ul>
<p>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 1, 2003 3:47 pm</body></html>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:07 am</body></html>
+1 -2
View File
@@ -8,9 +8,8 @@
<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="./Macros.html">Macros</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 November 6, 2003 11:39 am</body></html>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:32 am</body></html>
-28
View File
@@ -1,28 +0,0 @@
import re
import sys
import os
import string
def tidy_attr(attr_value):
return string.lower(attr_value.group())
def tidy(file):
lines = open(file, 'r').readlines()
regex = re.compile(r'[name|class]="([^"]*)"')
xsltproc_patch = re.compile(r'(\|\|\|)')
for i in range(len(lines)):
lines[i] = regex.sub(tidy_attr,lines[i])
lines[i] = xsltproc_patch.sub(' ',lines[i])
open(file, 'w') \
.writelines(lines)
def main():
if len(sys.argv) < 2:
print '\tusage: %s <html document>' % sys.argv[0]
return -1
tidy(sys.argv[1])
print 'done!'
main()
-7
View File
@@ -1,7 +0,0 @@
doctype: loose
tidy-mark: no
wrap: 0
wrap-attributes: no
enclose-text: yes
drop-empty-paras: no
quiet: yes
+7 -11
View File
@@ -197,12 +197,10 @@ template<
typename F, AUX_APPLY_N_PARAMS(i, typename T)
>
struct BOOST_PP_CAT(apply,i)
: BOOST_PP_CAT(aux::msvc_apply,i)<F>::template result_<
AUX_APPLY_N_PARAMS(i, T)
>
{
// Metafunction forwarding confuses vc6
typedef typename BOOST_PP_CAT(aux::msvc_apply,i)<F>::template result_<
AUX_APPLY_N_PARAMS(i, T)
>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(
BOOST_PP_INC(i)
, BOOST_PP_CAT(apply,i)
@@ -242,18 +240,16 @@ struct BOOST_PP_CAT(apply,i)
};
# else
// ISO98 C++, with minor concession to vc7
// ISO98 C++
template<
typename F, AUX_APPLY_N_PARAMS(i, typename T)
>
struct BOOST_PP_CAT(apply,i)
: F::template apply<
AUX_APPLY_N_PARAMS(i, T)
>
{
// Metafunction forwarding confuses vc7
typedef typename F::template apply<
AUX_APPLY_N_PARAMS(i, T)
>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(
BOOST_PP_INC(i)
, BOOST_PP_CAT(apply,i)
+15 -16
View File
@@ -1,15 +1,9 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
#define BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
// + file: boost/mpl/aux_/advance_backward.hpp
// + last modified: 06/aug/03
// Copyright (c) 2000-03
//-----------------------------------------------------------------------------
// boost mpl/aux_/advance_backward.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -19,8 +13,13 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
#define BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/prior.hpp"
@@ -28,8 +27,8 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
+15 -16
View File
@@ -1,15 +1,9 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
// + file: boost/mpl/aux_/advance_forward.hpp
// + last modified: 06/aug/03
// Copyright (c) 2000-03
//-----------------------------------------------------------------------------
// boost mpl/aux_/advance_forward.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -19,8 +13,13 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/next.hpp"
@@ -28,8 +27,8 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
@@ -71,6 +71,11 @@ AUX_AGLORITM_TRAIT_SPEC(end, nested_begin_end_tag, typename Sequence::end)
AUX_AGLORITM_TRAIT_SPEC(begin, non_sequence_tag, void_)
AUX_AGLORITM_TRAIT_SPEC(end, non_sequence_tag, void_)
#if defined(BOOST_MPL_MSVC_ETI_BUG)
AUX_AGLORITM_TRAIT_SPEC(begin, int, int)
AUX_AGLORITM_TRAIT_SPEC(end, int, int)
#endif
# undef AUX_AGLORITM_TRAIT_SPEC
-1
View File
@@ -19,7 +19,6 @@
#include "boost/mpl/clear_fwd.hpp"
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
namespace boost {
namespace mpl {
+3 -7
View File
@@ -19,14 +19,10 @@
#include "boost/config.hpp"
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& ( defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
)
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_MPL_NO_BIND_TEMPLATE)
# define BOOST_MPL_NO_BIND_TEMPLATE
#endif
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
+1 -1
View File
@@ -27,7 +27,7 @@
#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300
# define BOOST_MPL_COMPILER_DIR msvc70
#elif defined(__GNUC__) && !defined(__EDG_VERSION__)
#elif defined(__GNUC__)
# define BOOST_MPL_COMPILER_DIR gcc
#elif defined(__BORLANDC__)
+2 -5
View File
@@ -19,12 +19,9 @@
#include "boost/config.hpp"
#if !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION
#endif
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp"
@@ -24,15 +24,11 @@
// template< typename T > struct b;
// template< typename T, T n > struct b< a<T,n> > {};
#if !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& ( defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__GNUC__) && !defined(__EDG_VERSION__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
)
#if defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION)
# define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION
#endif
#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
+7 -15
View File
@@ -25,25 +25,17 @@
// the owner class is a class template), and Borland 5.6 isn't even
// able to compile a definition of nested class template with DTP
#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \
(__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \
(__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif
#if !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& ( defined(__MWERKS__) && __MWERKS__ <= 0x3001 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x570 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
)
#if defined(__MWERKS__) && __MWERKS__ <= 0x3001 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x570 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
&& !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif
#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
@@ -1,11 +1,9 @@
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
// + file: boost/mpl/aux_/config/overload_resolution.hpp
// + last modified: 23/jun/03
// Copyright (c) 2002-03
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/overload_resolution.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -15,19 +13,16 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/aux_/config/workaround.hpp"
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|| BOOST_WORKAROUND(__MWERKS__, < 0x3001) \
)
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__MWERKS__) && __MWERKS__ < 0x3001 \
&& !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION)
# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
#endif
#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
+19 -27
View File
@@ -1,38 +1,30 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/preprocessor.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
// Copyright (c) 2000-04 Aleksey Gurtovoy
//
// Use, modification and distribution are subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
// at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Source$
// $Date$
// $Revision$
#include "boost/mpl/aux_/config/workaround.hpp"
#if !defined(BOOST_MPL_BROKEN_PP_MACRO_EXPANSION) \
&& ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
)
#include "boost/config.hpp"
#if defined(__MWERKS__) && (__MWERKS__ <= 0x3003 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
# define BOOST_MPL_BROKEN_PP_MACRO_EXPANSION
#endif
//#define BOOST_MPL_NO_OWN_PP_PRIMITIVES
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \
&& BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x833))
# define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING
#endif
#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
+6 -13
View File
@@ -19,23 +19,16 @@
#include "boost/config.hpp"
#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \
&& ( !defined(BOOST_MSVC) || BOOST_MSVC < 1300 )
#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \
&& (!defined(BOOST_MSVC) || BOOST_MSVC < 1300)
# define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS
#endif
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& ( defined(__GNUC__) && !defined(__EDG_VERSION__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
)
#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
#endif
#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
+2 -5
View File
@@ -20,12 +20,9 @@
// agurt, 10/jul/02: full-fledged __typeof is needed to permit the optimal
// vector implementation
#if !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
&& defined(__MWERKS__) && __MWERKS__ >= 0x3001
#if defined(__MWERKS__) && __MWERKS__ >= 0x3001 \
&& !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL)
# define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL
#endif
#endif // BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED
-44
View File
@@ -1,44 +0,0 @@
#ifndef BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
// + file: boost/mpl/aux_/count_impl.hpp
// + last modified: 05/nov/03
// Copyright Aleksey Gurtovoy 2000-03
//
// Use, modification and distribution are subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
// at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/count_fwd.hpp"
#include "boost/mpl/count_if.hpp"
#include "boost/mpl/same_as.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
#include "boost/mpl/aux_/config/workaround.hpp"
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
namespace boost {
namespace mpl {
template< typename Tag > struct count_impl
{
template< typename Sequence, typename T > struct apply
#if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x561))
{
typedef typename count_if< Sequence,same_as<T> >::type type;
BOOST_STATIC_CONSTANT(int, value = BOOST_MPL_AUX_VALUE_WKND(type)::value);
#else
: count_if< Sequence,same_as<T> >
{
#endif
};
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,count_impl)
}}
#endif // BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
+5 -33
View File
@@ -3,7 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-03
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -17,16 +17,14 @@
#ifndef BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
#define BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
#include "boost/mpl/aux_/is_msvc_eti_arg.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#if defined(BOOST_MPL_MSVC_ETI_BUG)
namespace boost { namespace mpl { namespace aux {
# if defined(BOOST_MPL_MSVC_60_ETI_BUG)
template< typename Iterator > struct deref_wknd
template< typename Iterator >
struct deref_wknd
{
typedef typename Iterator::type type;
};
@@ -36,40 +34,14 @@ template<> struct deref_wknd<int>
typedef int type;
};
# else
template< bool > struct deref_wknd_impl
{
template< typename Iterator > struct result_
{
typedef typename Iterator::type type;
};
};
template<> struct deref_wknd_impl<false>
{
template< typename Iterator > struct result_
{
typedef int type;
};
};
template< typename Iterator > struct deref_wknd
: deref_wknd_impl< !aux::is_msvc_eti_arg<Iterator>::value >
::template result_<Iterator>
{
};
# endif // BOOST_MPL_MSVC_60_ETI_BUG
}}} // namespace boost::mpl::aux
# define BOOST_MPL_AUX_DEREF_WNKD(iter) ::boost::mpl::aux::deref_wknd<iter>::type
# define BOOST_MPL_AUX_DEREF_WNKD(iter) aux::deref_wknd<iter>::type
#else
# define BOOST_MPL_AUX_DEREF_WNKD(iter) iter::type
#endif // BOOST_MPL_MSVC_ETI_BUG
#endif
#endif // BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
-41
View File
@@ -1,41 +0,0 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/find_if_pred.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy, Eric Friedman
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
#define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
#include "boost/mpl/aux_/iter_apply.hpp"
#include "boost/mpl/not.hpp"
namespace boost {
namespace mpl {
namespace aux {
template< typename Predicate >
struct find_if_pred
{
template< typename Iterator >
struct apply
{
typedef not_< aux::iter_apply1<Predicate,Iterator> > type;
};
};
} // namespace aux
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
+35 -50
View File
@@ -1,15 +1,9 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
// + file: boost/mpl/aux_/full_lambda.hpp
// + last modified: 03/aug/03
// Copyright (c) 2001-03
//-----------------------------------------------------------------------------
// boost mpl/aux_/full_lambda.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -19,8 +13,13 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/lambda_fwd.hpp"
@@ -82,7 +81,6 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity<T>::value >)
>
@@ -94,11 +92,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity<T>::value >)
>
struct lambda
: lambda_impl<T,Tag,false_ AUX_ARITY_PARAM(Arity)>
: lambda_impl<T,false_ AUX_ARITY_PARAM(Arity)>
{
};
@@ -124,11 +121,11 @@ struct lambda_or< BOOST_MPL_PP_ENUM(n,false) >
} // namespace aux
#undef n
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect AUX_ARITY_PARAM(int_<-1>) >
template< int N, typename Protect >
struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(int_<-1>) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_)
typedef mpl::arg<N> type; // qualified for the sake of MIPSpro 7.41
typedef arg<N> type;
};
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
@@ -138,8 +135,8 @@ struct lambda_impl< arg<N>,Tag,Protect AUX_ARITY_PARAM(int_<-1>) >
#include BOOST_PP_ITERATE()
//: special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect AUX_ARITY_PARAM(int_<1>) >
template< typename T, typename Protect >
struct lambda_impl< protect<T>, Protect AUX_ARITY_PARAM(int_<1>) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
typedef protect<T> type;
@@ -148,12 +145,10 @@ struct lambda_impl< protect<T>,Tag,Protect AUX_ARITY_PARAM(int_<1>) >
//: specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, AUX_LAMBDA_BIND_PARAMS(typename T)
, typename Tag
, typename Protect
>
struct lambda_impl<
bind<F,AUX_LAMBDA_BIND_PARAMS(T)>
, Tag
, Protect
AUX_ARITY_PARAM(int_<BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY)>)
>
@@ -164,10 +159,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(int_<2>) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
typedef bind1st<F,T> type;
@@ -175,10 +169,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(int_<2>) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
typedef bind2nd<F,T> type;
@@ -205,10 +198,9 @@ struct lambda_impl< bind2nd<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, typename Tag
>
struct lambda< F<AUX_LAMBDA_PARAMS(i, T)>, Tag AUX_ARITY_PARAM(int_<i>) >
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>,Tag,true_ AUX_ARITY_PARAM(int_<i>) >
struct lambda< F<AUX_LAMBDA_PARAMS(i, T)> AUX_ARITY_PARAM(int_<i>) >
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, true_ AUX_ARITY_PARAM(int_<i>) >
{
};
@@ -217,20 +209,19 @@ struct lambda< F<AUX_LAMBDA_PARAMS(i, T)>, Tag AUX_ARITY_PARAM(int_<i>) >
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, typename Tag
, typename Protect
>
struct lambda_impl<
F<AUX_LAMBDA_PARAMS(i, T)>, Tag, Protect AUX_ARITY_PARAM(int_<i>)
F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_ARITY_PARAM(int_<i>)
>
{
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
BOOST_PP_COMMA_IF(i) \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)),Tag >::type \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \
/**/
typedef BOOST_PP_CAT(bind,i)<
BOOST_PP_CAT(quote,i)<F,Tag>
BOOST_PP_CAT(quote,i)<F>
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
> type;
@@ -247,7 +238,7 @@ struct lambda_impl<
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename L)
>
@@ -259,27 +250,25 @@ struct BOOST_PP_CAT(le_result,i)
};
template<
typename Tag
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename L)
>
struct BOOST_PP_CAT(le_result,i)< true_,Tag,false_,F,AUX_LAMBDA_PARAMS(i, L) >
struct BOOST_PP_CAT(le_result,i)< true_,false_,F,AUX_LAMBDA_PARAMS(i, L) >
{
typedef BOOST_PP_CAT(bind,i)<
BOOST_PP_CAT(quote,i)<F,Tag>
BOOST_PP_CAT(quote,i)<F>
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
> type;
};
template<
typename Tag
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename L)
>
struct BOOST_PP_CAT(le_result,i)< true_,Tag,true_,F,AUX_LAMBDA_PARAMS(i, L) >
struct BOOST_PP_CAT(le_result,i)< true_,true_,F,AUX_LAMBDA_PARAMS(i, L) >
{
typedef protect< BOOST_PP_CAT(bind,i)<
BOOST_PP_CAT(quote,i)<F,Tag>
BOOST_PP_CAT(quote,i)<F>
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
> > type;
};
@@ -287,7 +276,7 @@ struct BOOST_PP_CAT(le_result,i)< true_,Tag,true_,F,AUX_LAMBDA_PARAMS(i, L) >
} // namespace aux
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)), Tag > \
typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) > \
BOOST_PP_CAT(l,BOOST_PP_INC(i)); \
/**/
@@ -299,11 +288,10 @@ struct BOOST_PP_CAT(le_result,i)< true_,Tag,true_,F,AUX_LAMBDA_PARAMS(i, L) >
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, typename Tag
, typename Protect
>
struct lambda_impl<
F<AUX_LAMBDA_PARAMS(i, T)>, Tag, Protect AUX_ARITY_PARAM(int_<i>)
F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_ARITY_PARAM(int_<i>)
>
{
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
@@ -313,7 +301,6 @@ struct lambda_impl<
typedef typename aux::BOOST_PP_CAT(le_result,i)<
typename is_le::type
, Tag
, Protect
, F
, AUX_LAMBDA_PARAMS(i, l)
@@ -329,12 +316,10 @@ struct lambda_impl<
template<
typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T)
, typename Tag
, typename Protect
>
struct lambda_impl<
BOOST_PP_CAT(bind,i)<F AUX_LAMBDA_BIND_N_PARAMS(i, T)>
, Tag
, Protect AUX_ARITY_PARAM(int_<BOOST_PP_INC(i)>)
>
{
-38
View File
@@ -1,38 +0,0 @@
#ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
// + file: boost/mpl/aux_/has_key_impl.hpp
// + last modified: 02/may/03
// Copyright (c) 2002-03
// David Abrahams, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/has_key_fwd.hpp"
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
namespace boost {
namespace mpl {
// no default implementation; the definition is needed to make MSVC happy
template< typename Tag > struct has_key_impl
{
template< typename AssociativeSequence, typename Key > struct apply;
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl)
}}
#endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+107 -163
View File
@@ -1,96 +1,62 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/has_xxx.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
#define BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
// Copyright (C) Aleksey Gurtovoy 2002-2003
// Copyright (C) David Abrahams 2002-2003
//
// Use, modification and distribution are subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
// at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Source$
// $Date$
// $Revision$
#include "boost/mpl/aux_/type_wrapper.hpp"
#include "boost/mpl/aux_/yes_no.hpp"
#include "boost/mpl/aux_/config/msvc_typename.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
#include "boost/detail/workaround.hpp"
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \
&& !BOOST_WORKAROUND(__GNUC__, <= 2) \
&& !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x833))
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) && (!defined(__GNUC__) || __GNUC__ == 3)
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
# if (!defined(BOOST_MSVC) || BOOST_MSVC > 1300)
// the implementation below is based on a USENET newsgroup's posting by
// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
template< typename T > \
boost::mpl::aux::yes_tag \
trait##_helper( \
boost::mpl::aux::type_wrapper<T> const volatile* \
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME T::name>* = 0 \
); \
\
boost::mpl::aux::no_tag \
trait##_helper(...); \
\
template< typename T > \
struct trait \
{ \
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof((trait##_helper)(static_cast<t_*>(0))) \
== sizeof(boost::mpl::aux::yes_tag) \
); \
}; \
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
template< typename T > \
boost::mpl::aux::yes_tag \
trait##_helper( \
boost::mpl::aux::type_wrapper<T> const volatile* \
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME T::name>* = 0 \
); \
\
boost::mpl::aux::no_tag \
trait##_helper(...); \
\
template< typename T > \
struct trait \
{ \
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof((trait##_helper)(static_cast<t_*>(0))) \
== sizeof(boost::mpl::aux::yes_tag) \
); \
}; \
/**/
# else // conforming compilers
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
template< typename T > \
struct trait \
{ \
struct helpers \
{ \
template< typename U > \
static boost::mpl::aux::yes_tag \
test( \
boost::mpl::aux::type_wrapper<U> const volatile* \
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
); \
\
static boost::mpl::aux::no_tag \
test(...); \
}; \
\
typedef boost::mpl::aux::type_wrapper<T> t_; \
\
BOOST_STATIC_CONSTANT( \
bool, value = \
sizeof(helpers::test(static_cast<t_*>(0))) \
== sizeof(boost::mpl::aux::yes_tag) \
); \
}; \
/**/
# endif
# else
# include "boost/mpl/if.hpp"
# include "boost/mpl/bool.hpp"
# include "boost/preprocessor/cat.hpp"
#include "boost/mpl/if.hpp"
#include "boost/mpl/bool.hpp"
#include "boost/preprocessor/cat.hpp"
// agurt, 11/sep/02: MSVC version, based on a USENET newsgroup's posting by
// John Madsen (comp.lang.c++.moderated, 1999-11-12 19:17:06 GMT);
@@ -103,31 +69,13 @@ namespace boost { namespace mpl { namespace aux {
struct has_xxx_tag;
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template <class U>
struct msvc_incomplete_array
{
typedef char (&type)[sizeof(U) + 1];
};
# endif
template <typename T>
template< typename T >
struct msvc_is_incomplete
{
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
// type, it won't pick the second overload
static char tester(...);
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template <class U>
static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>);
# else
template <class U>
static char (& tester(type_wrapper<U>) )[sizeof(U)+1];
# endif
BOOST_STATIC_CONSTANT(
bool, value = sizeof(tester(type_wrapper<T>())) == 1);
struct incomplete_;
BOOST_STATIC_CONSTANT(bool, value =
sizeof(void (T::*)()) == sizeof(void (incomplete_::*)())
);
};
template<>
@@ -138,87 +86,83 @@ struct msvc_is_incomplete<int>
}}}
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
struct BOOST_PP_CAT(trait,_impl) : T \
{ \
private: \
static boost::mpl::aux::no_tag test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
static boost::mpl::aux::yes_tag test(...); \
\
public: \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(test(static_cast<void(*)(name)>(0))) \
!= sizeof(boost::mpl::aux::no_tag) \
); \
}; \
\
template< typename T > struct trait \
: boost::mpl::if_c< \
boost::mpl::aux::msvc_is_incomplete<T>::value \
, boost::mpl::bool_<false> \
, BOOST_PP_CAT(trait,_impl)<T> \
>::type \
{ \
}; \
\
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
struct BOOST_PP_CAT(trait,_impl) : T \
{ \
private: \
static boost::mpl::aux::no_tag test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
static boost::mpl::aux::yes_tag test(...); \
\
public: \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(test(static_cast<void(*)(name)>(0))) \
!= sizeof(boost::mpl::aux::no_tag) \
); \
}; \
\
template< typename T > struct trait \
: boost::mpl::if_c< \
boost::mpl::aux::msvc_is_incomplete<T>::value \
, boost::mpl::bool_<false> \
, BOOST_PP_CAT(trait,_impl)<T> \
>::type \
{ \
}; \
\
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
/**/
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
template<> struct trait<T> \
{ \
BOOST_STATIC_CONSTANT(bool,value = false); \
}; \
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
template<> struct trait<T> \
{ \
BOOST_STATIC_CONSTANT(bool,value = false); \
}; \
/**/
# if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
/**/
# else
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
/**/
# endif
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
/**/
#else
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
/**/
#endif
# endif // BOOST_MSVC > 1300
#else
// agurt, 11/jan/03: signals a stub-only implementation
# define BOOST_MPL_NO_AUX_HAS_XXX
# define BOOST_NO_MPL_AUX_HAS_XXX
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_value) \
template< typename T > \
struct trait \
{ \
BOOST_STATIC_CONSTANT(bool, value = default_value); \
}; \
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_value) \
template< typename T > \
struct trait \
{ \
BOOST_STATIC_CONSTANT(bool, value = default_value); \
}; \
/**/
#endif // BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_##name, name, false) \
#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_##name, name, false) \
/**/
#endif // BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
+1 -1
View File
@@ -21,7 +21,7 @@
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|| BOOST_WORKAROUND(__GNUC__, < 3)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) T(expr)
#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3001)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
#else
+15 -19
View File
@@ -1,34 +1,30 @@
// Copyright (c) 2001-04 Aleksey Gurtovoy
//-----------------------------------------------------------------------------
// boost mpl/aux_/include_preprocessed.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Use, modification and distribution are subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
// at http://www.boost.org/LICENSE_1_0.txt)
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// See http://www.boost.org/libs/mpl for documentation.
// $Source$
// $Date$
// $Revision$
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
// no include guards, the header is intended for multiple inclusion!
#include "boost/mpl/aux_/config/compiler.hpp"
#include "boost/mpl/aux_/config/preprocessor.hpp"
#include "boost/preprocessor/cat.hpp"
#include "boost/preprocessor/stringize.hpp"
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
# define AUX_PREPROCESSED_HEADER \
BOOST_MPL_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \
aux_/preprocessed/BOOST_MPL_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \
/**/
#else
# define AUX_PREPROCESSED_HEADER \
BOOST_PP_CAT(BOOST_MPL_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
/**/
#endif
# include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX_PREPROCESSED_HEADER)
# include BOOST_PP_STRINGIZE(boost/mpl/AUX_PREPROCESSED_HEADER)
# undef AUX_PREPROCESSED_HEADER
#undef BOOST_MPL_PREPROCESSED_HEADER
+10 -19
View File
@@ -1,6 +1,6 @@
// + file: boost/mpl/aux_/intergal_wrapper.hpp
// + last modified: 12/apr/03
// + last modified: 27/jan/03
// Copyright (c) 2000-03
// Aleksey Gurtovoy
@@ -17,7 +17,7 @@
// no include guards, the header is intended for multiple inclusion!
#include "boost/mpl/aux_/static_cast.hpp"
#include "boost/mpl/aux_/ice_cast.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
#include "boost/mpl/aux_/config/workaround.hpp"
@@ -33,11 +33,7 @@
#endif
#if !defined(AUX_WRAPPER_INST)
# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
# define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value >
# else
# define AUX_WRAPPER_INST(value) mpl::AUX_WRAPPER_NAME< value >
# endif
# define AUX_WRAPPER_INST(value) mpl::AUX_WRAPPER_NAME< value >
#endif
namespace boost { namespace mpl {
@@ -60,33 +56,28 @@ struct AUX_WRAPPER_NAME
// either
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
private:
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
public:
typedef AUX_WRAPPER_INST(next_value) next;
typedef AUX_WRAPPER_INST(prior_value) prior;
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
|| BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
#else
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next;
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
#endif
// enables uniform function call syntax for families of overloaded
// functions that return objects of both arithmetic ('int', 'long',
// 'double', etc.) and wrapped integral types (for an example, see
// "mpl/example/power.cpp")
operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast<AUX_WRAPPER_VALUE_TYPE>(this->value); }
operator AUX_WRAPPER_VALUE_TYPE() const { return this->value; }
};
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< AUX_WRAPPER_PARAMS(N) >
AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value;
#endif
}} // namespace boost::mpl
#undef AUX_WRAPPER_NAME
+26 -38
View File
@@ -1,15 +1,9 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
// + file: boost/mpl/aux_/lambda_no_ctps.hpp
// + last modified: 03/aug/03
// Copyright (c) 2001-03
//-----------------------------------------------------------------------------
// boost mpl/lambda_no_ctps.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -19,22 +13,26 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/lambda_fwd.hpp"
# include "boost/mpl/bind.hpp"
# include "boost/mpl/protect.hpp"
# include "boost/mpl/bool.hpp"
# include "boost/mpl/void.hpp"
# include "boost/mpl/aux_/template_arity.hpp"
#endif
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
@@ -64,7 +62,7 @@ namespace aux {
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -76,22 +74,17 @@ template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_imp
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
{
// Metafunction forwarding confuses vc6
typedef typename aux::lambda_impl<
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
, Protect
#else
, bool_<Protect>::value
#endif
>::template result_<T,Tag>::type type;
>::template result_<T>
{
};
# undef AUX_LAMBDA_PARAMS
@@ -108,37 +101,32 @@ struct lambda
#define i BOOST_PP_FRAME_ITERATION(1)
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
typedef typename lambda< \
, typename lambda< \
typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i)) \
, Tag \
, false \
>::type BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
>::type \
/**/
template<> struct lambda_impl<i,false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
typedef BOOST_PP_CAT(bind,i)<
f_
, AUX_LAMBDA_PARAMS(i, arg)
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
> type;
};
};
template<> struct lambda_impl<i,true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
typedef mpl::protect< BOOST_PP_CAT(bind,i)<
f_
, AUX_LAMBDA_PARAMS(i, arg)
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
> > type;
};
};
-3
View File
@@ -17,7 +17,6 @@
#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
#include "boost/mpl/void.hpp"
#include "boost/mpl/lambda_fwd.hpp"
#include "boost/mpl/int_fwd.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
@@ -29,11 +28,9 @@
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \
template< \
BOOST_MPL_PP_PARAMS(i, typename T) \
, typename Tag \
> \
struct lambda< \
name< BOOST_MPL_PP_PARAMS(i, T) > \
, Tag \
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
> \
{ \
+1 -2
View File
@@ -21,8 +21,7 @@
#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__SUNPRO_CC)
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
namespace boost { namespace mpl { namespace aux {
-38
View File
@@ -1,38 +0,0 @@
#ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
// + file: boost/mpl/aux_/order_impl.hpp
// + last modified: 03/may/03
// Copyright (c) 2002-03
// David Abrahams, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/order_fwd.hpp"
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
namespace boost {
namespace mpl {
// no default implementation; the definition is needed to make MSVC happy
template< typename Tag > struct order_impl
{
template< typename AssociativeSequence, typename Key > struct apply;
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl)
}}
#endif // BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
-65
View File
@@ -1,65 +0,0 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/partition_op.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
#define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
#include "boost/mpl/apply.hpp"
#include "boost/mpl/apply_if.hpp"
#include "boost/mpl/if.hpp"
#include "boost/mpl/pair.hpp"
#include "boost/mpl/push_front.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp"
namespace boost {
namespace mpl {
namespace aux {
template <typename Predicate>
struct partition_op
{
template <typename State, typename Iter>
struct apply
{
private:
typedef typename State::first first_;
typedef typename State::second second_;
typedef typename Iter::type t_;
typedef typename apply1< Predicate,t_ >::type pred_;
typedef typename apply_if<
pred_
, push_front< first_, t_ >
, push_front< second_, t_ >
>::type result_;
public:
typedef typename if_<
pred_
, pair< result_,second_ >
, pair< first_,result_ >
>::type type;
};
};
} // namespace aux
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::partition_op)
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
+1 -11
View File
@@ -17,10 +17,8 @@
#ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
#include "boost/config.hpp"
#include "boost/mpl/pop_front_fwd.hpp"
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
#include "boost/detail/workaround.hpp"
namespace boost {
namespace mpl {
@@ -30,15 +28,7 @@ namespace mpl {
template< typename Tag >
struct pop_front_traits
{
template< typename Sequence > struct algorithm
// conservatively placed, but maybe should go outside surrounding
// braces.
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
{
typedef int type;
}
#endif
;
template< typename Sequence > struct algorithm;
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_front_traits)
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -19,6 +16,7 @@ struct resolve_bind_arg
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
@@ -53,6 +51,7 @@ struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -38,6 +35,7 @@ struct replace_unnamed_arg< arg<-1>,Arg >
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
@@ -72,6 +70,7 @@ struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -6,7 +6,6 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
, typename Arity = int_< aux::template_arity<T>::value >
>
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
, typename Arity = int_< aux::template_arity<T>::value >
>
struct lambda
: lambda_impl< T,Tag,false_,Arity >
: lambda_impl< T,false_,Arity >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect,int_<-1> >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,12 +52,10 @@ struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect, int_<1>
>
{
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag,int_<1> >
: lambda_impl< F<T1>,Tag,true_,int_<1> >
struct lambda< F<T1>,int_<1> >
: lambda_impl< F<T1>,true_,int_<1> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1>,Tag,Protect,int_<1 >
struct lambda_impl<
F< T1>,Protect,int_<1 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,12 +138,10 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect, int_<2>
>
{
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag,int_<2> >
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
struct lambda< F<T1,T2>,int_<2> >
: lambda_impl< F<T1,T2>,true_,int_<2> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2>,Tag,Protect,int_<2 >
struct lambda_impl<
F< T1,T2>,Protect,int_<2 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,12 +227,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect, int_<3>
>
{
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
struct lambda< F<T1,T2,T3>,int_<3> >
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3>,Tag,Protect,int_<3 >
struct lambda_impl<
F< T1,T2,T3>,Protect,int_<3 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,12 +317,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect, int_<4>
>
{
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
struct lambda< F<T1,T2,T3,T4>,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
struct lambda_impl<
F< T1,T2,T3,T4>,Protect,int_<4 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,12 +412,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect, int_<5>
>
{
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Protect,int_<5 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,12 +525,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect, int_<6>
>
{
@@ -579,25 +540,22 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect,int_<1> >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect,int_<1> >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
, int_<6>
>
{
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,184 +16,142 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, Protect
>::template result_< T,Tag >
>::template result_<T>
{
};
@@ -13,7 +13,7 @@ template<
struct list;
template<
>
struct list<
void_, void_, void_, void_, void_, void_, void_, void_, void_
@@ -21,7 +21,7 @@ struct list<
>
: list0< >
{
typedef list0< >::type type;
typedef list0< > type;
};
template<
@@ -32,16 +32,18 @@ struct list<
>
: list1<T0>
{
typedef typename list1<T0>::type type;
typedef list1<T0> type;
};
template<
typename T0, typename T1
>
struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ >
struct list<
T0, T1, void_, void_, void_, void_, void_, void_, void_, void_
>
: list2< T0,T1 >
{
typedef typename list2< T0,T1 >::type type;
typedef list2< T0,T1 > type;
};
template<
@@ -50,7 +52,7 @@ template<
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
: list3< T0,T1,T2 >
{
typedef typename list3< T0,T1,T2 >::type type;
typedef list3< T0,T1,T2 > type;
};
template<
@@ -59,7 +61,7 @@ template<
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
: list4< T0,T1,T2,T3 >
{
typedef typename list4< T0,T1,T2,T3 >::type type;
typedef list4< T0,T1,T2,T3 > type;
};
template<
@@ -68,7 +70,7 @@ template<
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
: list5< T0,T1,T2,T3,T4 >
{
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
typedef list5< T0,T1,T2,T3,T4 > type;
};
template<
@@ -78,7 +80,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
: list6< T0,T1,T2,T3,T4,T5 >
{
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
typedef list6< T0,T1,T2,T3,T4,T5 > type;
};
template<
@@ -88,7 +90,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
: list7< T0,T1,T2,T3,T4,T5,T6 >
{
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
};
template<
@@ -98,7 +100,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
{
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
};
template<
@@ -108,11 +110,10 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
{
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
};
// primary template (not a specialization!)
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -19,6 +16,7 @@ struct resolve_bind_arg
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
@@ -53,6 +51,7 @@ struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -38,6 +35,7 @@ struct replace_unnamed_arg< arg<-1>,Arg >
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
@@ -72,6 +70,7 @@ struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -6,7 +6,6 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
, typename Arity = int_< aux::template_arity<T>::value >
>
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
, typename Arity = int_< aux::template_arity<T>::value >
>
struct lambda
: lambda_impl< T,Tag,false_,Arity >
: lambda_impl< T,false_,Arity >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect,int_<-1> >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,12 +52,10 @@ struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect, int_<1>
>
{
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag,int_<1> >
: lambda_impl< F<T1>,Tag,true_,int_<1> >
struct lambda< F<T1>,int_<1> >
: lambda_impl< F<T1>,true_,int_<1> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1>,Tag,Protect,int_<1 >
struct lambda_impl<
F< T1>,Protect,int_<1 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,12 +138,10 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect, int_<2>
>
{
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag,int_<2> >
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
struct lambda< F<T1,T2>,int_<2> >
: lambda_impl< F<T1,T2>,true_,int_<2> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2>,Tag,Protect,int_<2 >
struct lambda_impl<
F< T1,T2>,Protect,int_<2 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,12 +227,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect, int_<3>
>
{
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
struct lambda< F<T1,T2,T3>,int_<3> >
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3>,Tag,Protect,int_<3 >
struct lambda_impl<
F< T1,T2,T3>,Protect,int_<3 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,12 +317,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect, int_<4>
>
{
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
struct lambda< F<T1,T2,T3,T4>,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
struct lambda_impl<
F< T1,T2,T3,T4>,Protect,int_<4 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,12 +412,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect, int_<5>
>
{
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Protect,int_<5 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,12 +525,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect, int_<6>
>
{
@@ -579,25 +540,22 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect,int_<1> >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect,int_<1> >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
, int_<6>
>
{
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,184 +16,142 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, Protect
>::template result_< T,Tag >
>::template result_<T>
{
};
@@ -13,7 +13,7 @@ template<
struct list;
template<
>
struct list<
void_, void_, void_, void_, void_, void_, void_, void_, void_
@@ -21,7 +21,7 @@ struct list<
>
: list0< >
{
typedef list0< >::type type;
typedef list0< > type;
};
template<
@@ -32,16 +32,18 @@ struct list<
>
: list1<T0>
{
typedef typename list1<T0>::type type;
typedef list1<T0> type;
};
template<
typename T0, typename T1
>
struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ >
struct list<
T0, T1, void_, void_, void_, void_, void_, void_, void_, void_
>
: list2< T0,T1 >
{
typedef typename list2< T0,T1 >::type type;
typedef list2< T0,T1 > type;
};
template<
@@ -50,7 +52,7 @@ template<
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
: list3< T0,T1,T2 >
{
typedef typename list3< T0,T1,T2 >::type type;
typedef list3< T0,T1,T2 > type;
};
template<
@@ -59,7 +61,7 @@ template<
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
: list4< T0,T1,T2,T3 >
{
typedef typename list4< T0,T1,T2,T3 >::type type;
typedef list4< T0,T1,T2,T3 > type;
};
template<
@@ -68,7 +70,7 @@ template<
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
: list5< T0,T1,T2,T3,T4 >
{
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
typedef list5< T0,T1,T2,T3,T4 > type;
};
template<
@@ -78,7 +80,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
: list6< T0,T1,T2,T3,T4,T5 >
{
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
typedef list6< T0,T1,T2,T3,T4,T5 > type;
};
template<
@@ -88,7 +90,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
: list7< T0,T1,T2,T3,T4,T5,T6 >
{
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
};
template<
@@ -98,7 +100,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
{
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
};
template<
@@ -108,11 +110,10 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
{
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
};
// primary template (not a specialization!)
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -360,7 +357,6 @@ struct resolve_bind_arg<
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
// primary template (not a specialization!)
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -457,7 +454,6 @@ struct resolve_bind_arg<
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
// primary template (not a specialization!)
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
@@ -6,7 +6,6 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
, typename Arity = int_< aux::template_arity<T>::value >
>
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
, typename Arity = int_< aux::template_arity<T>::value >
>
struct lambda
: lambda_impl< T,Tag,false_,Arity >
: lambda_impl< T,false_,Arity >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect,int_<-1> >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,12 +52,10 @@ struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect, int_<1>
>
{
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag,int_<1> >
: lambda_impl< F<T1>,Tag,true_,int_<1> >
struct lambda< F<T1>,int_<1> >
: lambda_impl< F<T1>,true_,int_<1> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1>,Tag,Protect,int_<1 >
struct lambda_impl<
F< T1>,Protect,int_<1 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,12 +138,10 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect, int_<2>
>
{
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag,int_<2> >
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
struct lambda< F<T1,T2>,int_<2> >
: lambda_impl< F<T1,T2>,true_,int_<2> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2>,Tag,Protect,int_<2 >
struct lambda_impl<
F< T1,T2>,Protect,int_<2 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,12 +227,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect, int_<3>
>
{
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
struct lambda< F<T1,T2,T3>,int_<3> >
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3>,Tag,Protect,int_<3 >
struct lambda_impl<
F< T1,T2,T3>,Protect,int_<3 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,12 +317,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect, int_<4>
>
{
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
struct lambda< F<T1,T2,T3,T4>,int_<4> >
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
struct lambda_impl<
F< T1,T2,T3,T4>,Protect,int_<4 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,12 +412,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect, int_<5>
>
{
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
struct lambda_impl<
F< T1,T2,T3,T4,T5>,Protect,int_<5 >
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,12 +525,10 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect, int_<6>
>
{
@@ -579,25 +540,22 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect,int_<1> >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect,int_<1> >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
, int_<6>
>
{
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,184 +16,142 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, Protect
>::template result_< T,Tag >
>::template result_<T>
{
};
@@ -13,7 +13,7 @@ template<
struct list;
template<
>
struct list<
void_, void_, void_, void_, void_, void_, void_, void_, void_
@@ -21,7 +21,7 @@ struct list<
>
: list0< >
{
typedef list0< >::type type;
typedef list0< > type;
};
template<
@@ -32,16 +32,18 @@ struct list<
>
: list1<T0>
{
typedef typename list1<T0>::type type;
typedef list1<T0> type;
};
template<
typename T0, typename T1
>
struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ >
struct list<
T0, T1, void_, void_, void_, void_, void_, void_, void_, void_
>
: list2< T0,T1 >
{
typedef typename list2< T0,T1 >::type type;
typedef list2< T0,T1 > type;
};
template<
@@ -50,7 +52,7 @@ template<
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
: list3< T0,T1,T2 >
{
typedef typename list3< T0,T1,T2 >::type type;
typedef list3< T0,T1,T2 > type;
};
template<
@@ -59,7 +61,7 @@ template<
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
: list4< T0,T1,T2,T3 >
{
typedef typename list4< T0,T1,T2,T3 >::type type;
typedef list4< T0,T1,T2,T3 > type;
};
template<
@@ -68,7 +70,7 @@ template<
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
: list5< T0,T1,T2,T3,T4 >
{
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
typedef list5< T0,T1,T2,T3,T4 > type;
};
template<
@@ -78,7 +80,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
: list6< T0,T1,T2,T3,T4,T5 >
{
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
typedef list6< T0,T1,T2,T3,T4,T5 > type;
};
template<
@@ -88,7 +90,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
: list7< T0,T1,T2,T3,T4,T5,T6 >
{
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
};
template<
@@ -98,7 +100,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
{
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
};
template<
@@ -108,11 +110,10 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
{
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
};
// primary template (not a specialization!)
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
@@ -19,7 +19,6 @@ struct quote_impl< T,false >
template<
template< typename P1 > class F
, typename Tag = void_
>
struct quote1
{
@@ -33,7 +32,6 @@ struct quote1
template<
template< typename P1, typename P2 > class F
, typename Tag = void_
>
struct quote2
{
@@ -47,7 +45,6 @@ struct quote2
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag = void_
>
struct quote3
{
@@ -61,7 +58,6 @@ struct quote3
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag = void_
>
struct quote4
{
@@ -82,7 +78,6 @@ template<
, typename P5
>
class F
, typename Tag = void_
>
struct quote5
{
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< nttp_long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< nttp_long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -101,7 +102,7 @@ struct advance_forward<4>
};
template< nttp_long N >
template< nttp_long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -48,11 +48,10 @@ template<
typename F, typename T1
>
struct apply1
{
typedef typename aux::msvc_apply1<F>::template result_<
: aux::msvc_apply1<F>::template result_<
T1
>::type type;
>
{
enum { arity = 2 }; typedef F arg1;
typedef T1 arg2;
friend class apply1_rebind;
@@ -95,11 +94,10 @@ template<
typename F, typename T1, typename T2
>
struct apply2
{
typedef typename aux::msvc_apply2<F>::template result_<
: aux::msvc_apply2<F>::template result_<
T1, T2
>::type type;
>
{
enum { arity = 3 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -143,10 +141,10 @@ template<
typename F, typename T1, typename T2, typename T3
>
struct apply3
{
typedef typename aux::msvc_apply3<F>::template result_<
: aux::msvc_apply3<F>::template result_<
T1, T2, T3
>::type type;
>
{
enum { arity = 4 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -197,10 +195,10 @@ template<
typename F, typename T1, typename T2, typename T3, typename T4
>
struct apply4
: aux::msvc_apply4<F>::template result_<
T1, T2, T3, T4
>
{
typedef typename aux::msvc_apply4<F>::template result_<
T1, T2, T3, T4
>::type type;
enum { arity = 5 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -255,10 +253,10 @@ template<
, typename T5
>
struct apply5
: aux::msvc_apply5<F>::template result_<
T1, T2, T3, T4, T5
>
{
typedef typename aux::msvc_apply5<F>::template result_<
T1, T2, T3, T4, T5
>::type type;
enum { arity = 6 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -4,10 +4,8 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template< bool >
struct resolve_arg_impl
{
@@ -21,7 +19,7 @@ struct resolve_arg_impl
};
};
template<>
template<>
struct resolve_arg_impl<true>
{
template<
@@ -36,7 +34,7 @@ struct resolve_arg_impl<true>
template< typename T > struct is_bind_template;
template<
template<
typename T, typename U1, typename U2, typename U3, typename U4
, typename U5
>
@@ -47,10 +45,12 @@ struct resolve_bind_arg
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
namespace aux {
template< nttp_int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
@@ -80,7 +80,6 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
@@ -91,6 +90,7 @@ template< typename T > struct is_bind_template
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -4,10 +4,8 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template< bool >
struct resolve_arg_impl
{
@@ -21,7 +19,7 @@ struct resolve_arg_impl
};
};
template<>
template<>
struct resolve_arg_impl<true>
{
template<
@@ -36,7 +34,7 @@ struct resolve_arg_impl<true>
template< typename T > struct is_bind_template;
template<
template<
typename T, typename U1, typename U2, typename U3, typename U4
, typename U5
>
@@ -46,7 +44,7 @@ struct resolve_bind_arg
{
};
template< typename T >
template< typename T >
struct replace_unnamed_arg_impl
{
template< typename Arg > struct result_
@@ -56,7 +54,7 @@ struct replace_unnamed_arg_impl
};
};
template<>
template<>
struct replace_unnamed_arg_impl< arg<-1> >
{
template< typename Arg > struct result_
@@ -66,17 +64,19 @@ struct replace_unnamed_arg_impl< arg<-1> >
};
};
template< typename T, typename Arg >
template< typename T, typename Arg >
struct replace_unnamed_arg
: replace_unnamed_arg_impl<T>::template result_<Arg>
{
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
namespace aux {
template< nttp_int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
@@ -106,7 +106,6 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
@@ -117,6 +116,7 @@ template< typename T > struct is_bind_template
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -6,9 +6,8 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
>
struct lambda_impl
{
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
>
struct lambda
: lambda_impl< T,Tag,false_ >
: lambda_impl< T,false_ >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,13 +52,11 @@ struct lambda_impl< arg<N>,Tag,Protect >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag >
: lambda_impl< F<T1>,Tag,true_ >
struct lambda< F<T1> >
: lambda_impl< F<T1>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F<T1>, Tag, Protect
struct lambda_impl<
F<T1>, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,13 +138,11 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag >
: lambda_impl< F<T1,T2>,Tag,true_ >
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2 >, Tag, Protect
struct lambda_impl<
F< T1,T2 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,13 +227,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag >
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,13 +317,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,13 +412,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,13 +525,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -579,26 +540,23 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect >
struct lambda_impl< bind1st<F,T>,Protect >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
struct lambda_impl< bind2nd<F,T>,Protect >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< nttp_int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,183 +16,143 @@ template< nttp_int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, bool_<Protect>::value
>::template result_<T>
{
typedef aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, bool_<Protect>::value
>::template result_< T,Tag >::type type;
};
} // namespace mpl
@@ -3,6 +3,7 @@
namespace boost {
namespace mpl {
namespace aux {
template< nttp_int N > struct list_impl_chooser;
}
@@ -18,9 +19,9 @@ struct list_impl_chooser<0>
>
struct result_
{
typedef typename list0<
>::type type;
typedef list0<
> type;
};
};
@@ -37,9 +38,9 @@ struct list_impl_chooser<1>
>
struct result_
{
typedef typename list1<
T0
>::type type;
typedef list1<
T0
> type;
};
};
@@ -56,9 +57,9 @@ struct list_impl_chooser<2>
>
struct result_
{
typedef typename list2<
T0, T1
>::type type;
typedef list2<
T0, T1
> type;
};
};
@@ -75,9 +76,9 @@ struct list_impl_chooser<3>
>
struct result_
{
typedef typename list3<
T0, T1, T2
>::type type;
typedef list3<
T0, T1, T2
> type;
};
};
@@ -94,9 +95,9 @@ struct list_impl_chooser<4>
>
struct result_
{
typedef typename list4<
T0, T1, T2, T3
>::type type;
typedef list4<
T0, T1, T2, T3
> type;
};
};
@@ -113,9 +114,9 @@ struct list_impl_chooser<5>
>
struct result_
{
typedef typename list5<
T0, T1, T2, T3, T4
>::type type;
typedef list5<
T0, T1, T2, T3, T4
> type;
};
};
@@ -132,9 +133,9 @@ struct list_impl_chooser<6>
>
struct result_
{
typedef typename list6<
T0, T1, T2, T3, T4, T5
>::type type;
typedef list6<
T0, T1, T2, T3, T4, T5
> type;
};
};
@@ -151,9 +152,9 @@ struct list_impl_chooser<7>
>
struct result_
{
typedef typename list7<
T0, T1, T2, T3, T4, T5, T6
>::type type;
typedef list7<
T0, T1, T2, T3, T4, T5, T6
> type;
};
};
@@ -170,9 +171,9 @@ struct list_impl_chooser<8>
>
struct result_
{
typedef typename list8<
T0, T1, T2, T3, T4, T5, T6, T7
>::type type;
typedef list8<
T0, T1, T2, T3, T4, T5, T6, T7
> type;
};
};
@@ -189,9 +190,9 @@ struct list_impl_chooser<9>
>
struct result_
{
typedef typename list9<
T0, T1, T2, T3, T4, T5, T6, T7, T8
>::type type;
typedef list9<
T0, T1, T2, T3, T4, T5, T6, T7, T8
> type;
};
};
@@ -208,9 +209,9 @@ struct list_impl_chooser<10>
>
struct result_
{
typedef typename list10<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
>::type type;
typedef list10<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
> type;
};
};
@@ -243,7 +244,6 @@ struct list_count_args
+ is_list_arg<T7>::value + is_list_arg<T8>::value
+ is_list_arg<T9>::value + is_list_arg<T10>::value
};
};
template<
@@ -253,7 +253,7 @@ template<
struct list_impl
{
typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_;
typedef typename aux::list_impl_chooser<
typedef typename aux::list_impl_chooser<
arg_num_::value
>::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
@@ -270,7 +270,7 @@ struct list
: aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type
{
typedef typename aux::list_impl<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
>::type type;
};
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -49,11 +49,10 @@ template<
typename F, typename T1
>
struct apply1
: F::template apply<
T1
>
{
typedef typename F::template apply<
T1
>::type type;
enum { arity = 2 }; typedef F arg1;
typedef T1 arg2;
friend class apply1_rebind;
@@ -93,10 +92,10 @@ template<
typename F, typename T1, typename T2
>
struct apply2
: F::template apply<
T1, T2
>
{
typedef typename F::template apply<
T1, T2
>::type type;
enum { arity = 3 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -137,11 +136,10 @@ template<
typename F, typename T1, typename T2, typename T3
>
struct apply3
: F::template apply<
T1, T2, T3
>
{
typedef typename F::template apply<
T1, T2, T3
>::type type;
enum { arity = 4 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -183,10 +181,10 @@ template<
typename F, typename T1, typename T2, typename T3, typename T4
>
struct apply4
: F::template apply<
T1, T2, T3, T4
>
{
typedef typename F::template apply<
T1, T2, T3, T4
>::type type;
enum { arity = 5 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -230,10 +228,10 @@ template<
, typename T5
>
struct apply5
: F::template apply<
T1, T2, T3, T4, T5
>
{
typedef typename F::template apply<
T1, T2, T3, T4, T5
>::type type;
enum { arity = 6 }; typedef F arg1;
typedef T1 arg2;
typedef T2 arg3;
@@ -4,10 +4,8 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template< bool >
struct resolve_arg_impl
{
@@ -21,7 +19,7 @@ struct resolve_arg_impl
};
};
template<>
template<>
struct resolve_arg_impl<true>
{
template<
@@ -36,7 +34,7 @@ struct resolve_arg_impl<true>
template< typename T > struct is_bind_template;
template<
template<
typename T, typename U1, typename U2, typename U3, typename U4
, typename U5
>
@@ -47,10 +45,12 @@ struct resolve_bind_arg
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
namespace aux {
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
@@ -80,7 +80,6 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
@@ -91,6 +90,7 @@ template< typename T > struct is_bind_template
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -4,10 +4,8 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template< bool >
struct resolve_arg_impl
{
@@ -21,7 +19,7 @@ struct resolve_arg_impl
};
};
template<>
template<>
struct resolve_arg_impl<true>
{
template<
@@ -36,7 +34,7 @@ struct resolve_arg_impl<true>
template< typename T > struct is_bind_template;
template<
template<
typename T, typename U1, typename U2, typename U3, typename U4
, typename U5
>
@@ -46,7 +44,7 @@ struct resolve_bind_arg
{
};
template< typename T >
template< typename T >
struct replace_unnamed_arg_impl
{
template< typename Arg > struct result_
@@ -56,7 +54,7 @@ struct replace_unnamed_arg_impl
};
};
template<>
template<>
struct replace_unnamed_arg_impl< arg<-1> >
{
template< typename Arg > struct result_
@@ -66,17 +64,19 @@ struct replace_unnamed_arg_impl< arg<-1> >
};
};
template< typename T, typename Arg >
template< typename T, typename Arg >
struct replace_unnamed_arg
: replace_unnamed_arg_impl<T>::template result_<Arg>
{
};
} // namespace aux
template< typename F, typename T > struct bind1st;
template< typename F, typename T > struct bind2nd;
namespace aux {
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
@@ -106,7 +106,6 @@ struct is_bind_template_impl<false>
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
@@ -117,6 +116,7 @@ template< typename T > struct is_bind_template
};
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
@@ -6,9 +6,8 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
>
struct lambda_impl
{
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
>
struct lambda
: lambda_impl< T,Tag,false_ >
: lambda_impl< T,false_ >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,13 +52,11 @@ struct lambda_impl< arg<N>,Tag,Protect >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag >
: lambda_impl< F<T1>,Tag,true_ >
struct lambda< F<T1> >
: lambda_impl< F<T1>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F<T1>, Tag, Protect
struct lambda_impl<
F<T1>, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,13 +138,11 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag >
: lambda_impl< F<T1,T2>,Tag,true_ >
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2 >, Tag, Protect
struct lambda_impl<
F< T1,T2 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,13 +227,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag >
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,13 +317,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,13 +412,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,13 +525,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -579,26 +540,23 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect >
struct lambda_impl< bind1st<F,T>,Protect >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
struct lambda_impl< bind2nd<F,T>,Protect >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,184 +16,142 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, Protect
>::template result_< T,Tag >
>::template result_<T>
{
};
@@ -3,6 +3,7 @@
namespace boost {
namespace mpl {
namespace aux {
template< int N > struct list_impl_chooser;
}
@@ -18,9 +19,9 @@ struct list_impl_chooser<0>
>
struct result_
{
typedef typename list0<
>::type type;
typedef list0<
> type;
};
};
@@ -37,9 +38,9 @@ struct list_impl_chooser<1>
>
struct result_
{
typedef typename list1<
T0
>::type type;
typedef list1<
T0
> type;
};
};
@@ -56,9 +57,9 @@ struct list_impl_chooser<2>
>
struct result_
{
typedef typename list2<
T0, T1
>::type type;
typedef list2<
T0, T1
> type;
};
};
@@ -75,9 +76,9 @@ struct list_impl_chooser<3>
>
struct result_
{
typedef typename list3<
T0, T1, T2
>::type type;
typedef list3<
T0, T1, T2
> type;
};
};
@@ -94,9 +95,9 @@ struct list_impl_chooser<4>
>
struct result_
{
typedef typename list4<
T0, T1, T2, T3
>::type type;
typedef list4<
T0, T1, T2, T3
> type;
};
};
@@ -113,9 +114,9 @@ struct list_impl_chooser<5>
>
struct result_
{
typedef typename list5<
T0, T1, T2, T3, T4
>::type type;
typedef list5<
T0, T1, T2, T3, T4
> type;
};
};
@@ -132,9 +133,9 @@ struct list_impl_chooser<6>
>
struct result_
{
typedef typename list6<
T0, T1, T2, T3, T4, T5
>::type type;
typedef list6<
T0, T1, T2, T3, T4, T5
> type;
};
};
@@ -151,9 +152,9 @@ struct list_impl_chooser<7>
>
struct result_
{
typedef typename list7<
T0, T1, T2, T3, T4, T5, T6
>::type type;
typedef list7<
T0, T1, T2, T3, T4, T5, T6
> type;
};
};
@@ -170,9 +171,9 @@ struct list_impl_chooser<8>
>
struct result_
{
typedef typename list8<
T0, T1, T2, T3, T4, T5, T6, T7
>::type type;
typedef list8<
T0, T1, T2, T3, T4, T5, T6, T7
> type;
};
};
@@ -189,9 +190,9 @@ struct list_impl_chooser<9>
>
struct result_
{
typedef typename list9<
T0, T1, T2, T3, T4, T5, T6, T7, T8
>::type type;
typedef list9<
T0, T1, T2, T3, T4, T5, T6, T7, T8
> type;
};
};
@@ -208,9 +209,9 @@ struct list_impl_chooser<10>
>
struct result_
{
typedef typename list10<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
>::type type;
typedef list10<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
> type;
};
};
@@ -243,7 +244,6 @@ struct list_count_args
+ is_list_arg<T7>::value + is_list_arg<T8>::value
+ is_list_arg<T9>::value + is_list_arg<T10>::value
};
};
template<
@@ -253,7 +253,7 @@ template<
struct list_impl
{
typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_;
typedef typename aux::list_impl_chooser<
typedef typename aux::list_impl_chooser<
arg_num_::value
>::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
@@ -270,7 +270,7 @@ struct list
: aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type
{
typedef typename aux::list_impl<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
>::type type;
};
@@ -3,6 +3,7 @@
namespace boost {
namespace mpl {
template< bool > struct quote_impl
{
template< typename T > struct result_
@@ -21,7 +22,6 @@ template<> struct quote_impl<false>
template<
template< typename P1 > class F
, typename Tag = void_
>
struct quote1
{
@@ -36,7 +36,6 @@ struct quote1
template<
template< typename P1, typename P2 > class F
, typename Tag = void_
>
struct quote2
{
@@ -51,7 +50,6 @@ struct quote2
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag = void_
>
struct quote3
{
@@ -66,7 +64,6 @@ struct quote3
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag = void_
>
struct quote4
{
@@ -88,7 +85,6 @@ template<
, typename P5
>
class F
, typename Tag = void_
>
struct quote5
{
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -360,7 +357,6 @@ struct resolve_bind_arg<
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
// primary template (not a specialization!)
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
@@ -4,9 +4,6 @@
namespace boost {
namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
namespace aux {
template<
@@ -457,7 +454,6 @@ struct resolve_bind_arg<
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
// primary template (not a specialization!)
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
@@ -6,9 +6,8 @@ namespace mpl {
template<
typename T
, typename Tag
, typename Protect = false_
>
struct lambda_impl
{
@@ -18,11 +17,10 @@ struct lambda_impl
template<
typename T
, typename Tag = void_
>
struct lambda
: lambda_impl< T,Tag,false_ >
: lambda_impl< T,false_ >
{
};
@@ -45,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Tag,Protect >
template< int N, typename Protect >
struct lambda_impl< arg<N>,Protect >
{
typedef true_ is_le;
typedef arg<N> type;
@@ -54,13 +52,11 @@ struct lambda_impl< arg<N>,Tag,Protect >
template<
typename F
, typename Tag
, typename Protect
>
struct lambda_impl<
bind0<F>
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -72,17 +68,16 @@ struct lambda_impl<
template<
template< typename P1 > class F
, typename T1
, typename Tag
>
struct lambda< F<T1>,Tag >
: lambda_impl< F<T1>,Tag,true_ >
struct lambda< F<T1> >
: lambda_impl< F<T1>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1 > class F
, typename L1
>
@@ -95,26 +90,24 @@ struct le_result1
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,false_,F,L1 >
struct le_result1< true_,false_,F,L1 >
{
typedef bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> type;
};
template<
template< typename P1 > class F
, typename Tag
, typename L1
>
struct le_result1< true_,Tag,true_,F,L1 >
struct le_result1< true_,true_,F,L1 >
{
typedef protect< bind1<
quote1< F,Tag >
quote1<F>
, typename L1::type
> > type;
};
@@ -124,21 +117,19 @@ struct le_result1< true_,Tag,true_,F,L1 >
template<
template< typename P1 > class F
, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
F<T1>, Tag, Protect
struct lambda_impl<
F<T1>, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
typename is_le::type
, Tag
, Protect
, F
, l1
@@ -147,13 +138,11 @@ struct lambda_impl<
template<
typename F, typename T1
, typename Tag
, typename Protect
>
struct lambda_impl<
bind1< F,T1 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -166,17 +155,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
>
struct lambda< F<T1,T2>,Tag >
: lambda_impl< F<T1,T2>,Tag,true_ >
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2 > class F
, typename L1, typename L2
>
@@ -189,26 +177,24 @@ struct le_result2
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,false_,F,L1,L2 >
struct le_result2< true_,false_,F,L1,L2 >
{
typedef bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> type;
};
template<
template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2
>
struct le_result2< true_,Tag,true_,F,L1,L2 >
struct le_result2< true_,true_,F,L1,L2 >
{
typedef protect< bind2<
quote2< F,Tag >
quote2<F>
, typename L1::type, typename L2::type
> > type;
};
@@ -218,15 +204,14 @@ struct le_result2< true_,Tag,true_,F,L1,L2 >
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2 >, Tag, Protect
struct lambda_impl<
F< T1,T2 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
@@ -234,7 +219,6 @@ struct lambda_impl<
typedef typename aux::le_result2<
typename is_le::type
, Tag
, Protect
, F
, l1, l2
@@ -243,13 +227,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2
, typename Tag
, typename Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -262,17 +244,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
>
struct lambda< F<T1,T2,T3>,Tag >
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3
>
@@ -285,26 +266,24 @@ struct le_result3
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
struct le_result3< true_,false_,F,L1,L2,L3 >
{
typedef bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3
>
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
struct le_result3< true_,true_,F,L1,L2,L3 >
{
typedef protect< bind3<
quote3< F,Tag >
quote3<F>
, typename L1::type, typename L2::type, typename L3::type
> > type;
};
@@ -314,16 +293,15 @@ struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -331,7 +309,6 @@ struct lambda_impl<
typedef typename aux::le_result3<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3
@@ -340,13 +317,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -359,17 +334,16 @@ struct lambda_impl<
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
>
struct lambda< F<T1,T2,T3,T4>,Tag >
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4
>
@@ -383,13 +357,12 @@ struct le_result4
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
struct le_result4< true_,false_,F,L1,L2,L3,L4 >
{
typedef bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> type;
@@ -397,13 +370,12 @@ struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4
>
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
struct le_result4< true_,true_,F,L1,L2,L3,L4 >
{
typedef protect< bind4<
quote4< F,Tag >
quote4<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type
> > type;
@@ -414,17 +386,16 @@ struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -433,7 +404,6 @@ struct lambda_impl<
typedef typename aux::le_result4<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4
@@ -442,13 +412,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -465,17 +433,16 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
>
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
{
};
namespace aux {
template<
typename IsLE, typename Tag, typename Protect
typename IsLE, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5
>
@@ -493,13 +460,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
{
typedef bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> type;
@@ -511,13 +477,12 @@ template<
, typename P5
>
class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5
>
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
{
typedef protect< bind5<
quote5< F,Tag >
quote5<F>
, typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type
> > type;
@@ -532,18 +497,17 @@ template<
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Tag, Protect
struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Protect
>
{
typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl< T5,Tag > l5;
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -552,7 +516,6 @@ struct lambda_impl<
typedef typename aux::le_result5<
typename is_le::type
, Tag
, Protect
, F
, l1, l2, l3, l4, l5
@@ -562,13 +525,11 @@ struct lambda_impl<
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -579,26 +540,23 @@ struct lambda_impl<
};
// special case for 'protect'
template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Tag,Protect >
template< typename T, typename Protect >
struct lambda_impl< protect<T>,Protect >
{
typedef false_ is_le;
typedef protect<T> type;
};
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, typename Tag
, typename Protect
>
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect
, Protect
>
{
typedef false_ is_le;
@@ -607,10 +565,9 @@ struct lambda_impl<
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind1st<F,T>,Tag,Protect >
struct lambda_impl< bind1st<F,T>,Protect >
{
typedef false_ is_le;
typedef bind1st< F,T > type;
@@ -618,10 +575,9 @@ struct lambda_impl< bind1st<F,T>,Tag,Protect >
template<
typename F, typename T
, typename Tag
, typename Protect
>
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
struct lambda_impl< bind2nd<F,T>,Protect >
{
typedef false_ is_le;
typedef bind2nd< F,T > type;
@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
// see the original for copyright information
namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T, typename Tag > struct result_
template< typename T > struct result_
{
typedef T type;
};
@@ -16,184 +16,142 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> type;
};
};
template<> struct lambda_impl<1, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1<
f_
, arg1
, typename lambda< typename F::arg1, false >::type
> > type;
};
};
template<> struct lambda_impl<2, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type;
};
};
template<> struct lambda_impl<2, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2<
f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type;
};
};
template<> struct lambda_impl<3, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type;
};
};
template<> struct lambda_impl<3, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3<
f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type;
};
};
template<> struct lambda_impl<4, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type;
};
};
template<> struct lambda_impl<4, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4<
f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type;
};
};
template<> struct lambda_impl<5, false>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type;
};
};
template<> struct lambda_impl<5, true>
{
template< typename F, typename Tag > struct result_
template< typename F > struct result_
{
typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5<
f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type;
};
};
} // namespace aux
template<
typename T
, typename Tag = void_
, bool Protect = true
>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
, Protect
>::template result_< T,Tag >
>::template result_<T>
{
};
@@ -13,7 +13,7 @@ template<
struct list;
template<
>
struct list<
void_, void_, void_, void_, void_, void_, void_, void_, void_
@@ -21,7 +21,7 @@ struct list<
>
: list0< >
{
typedef list0< >::type type;
typedef list0< > type;
};
template<
@@ -32,16 +32,18 @@ struct list<
>
: list1<T0>
{
typedef typename list1<T0>::type type;
typedef list1<T0> type;
};
template<
typename T0, typename T1
>
struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ >
struct list<
T0, T1, void_, void_, void_, void_, void_, void_, void_, void_
>
: list2< T0,T1 >
{
typedef typename list2< T0,T1 >::type type;
typedef list2< T0,T1 > type;
};
template<
@@ -50,7 +52,7 @@ template<
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
: list3< T0,T1,T2 >
{
typedef typename list3< T0,T1,T2 >::type type;
typedef list3< T0,T1,T2 > type;
};
template<
@@ -59,7 +61,7 @@ template<
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
: list4< T0,T1,T2,T3 >
{
typedef typename list4< T0,T1,T2,T3 >::type type;
typedef list4< T0,T1,T2,T3 > type;
};
template<
@@ -68,7 +70,7 @@ template<
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
: list5< T0,T1,T2,T3,T4 >
{
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
typedef list5< T0,T1,T2,T3,T4 > type;
};
template<
@@ -78,7 +80,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
: list6< T0,T1,T2,T3,T4,T5 >
{
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
typedef list6< T0,T1,T2,T3,T4,T5 > type;
};
template<
@@ -88,7 +90,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
: list7< T0,T1,T2,T3,T4,T5,T6 >
{
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
};
template<
@@ -98,7 +100,7 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
{
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
};
template<
@@ -108,11 +110,10 @@ template<
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
{
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
};
// primary template (not a specialization!)
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
@@ -19,7 +19,6 @@ struct quote_impl< T,false >
template<
template< typename P1 > class F
, typename Tag = void_
>
struct quote1
{
@@ -33,7 +32,6 @@ struct quote1
template<
template< typename P1, typename P2 > class F
, typename Tag = void_
>
struct quote2
{
@@ -47,7 +45,6 @@ struct quote2
template<
template< typename P1, typename P2, typename P3 > class F
, typename Tag = void_
>
struct quote3
{
@@ -61,7 +58,6 @@ struct quote3
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag = void_
>
struct quote4
{
@@ -82,7 +78,6 @@ template<
, typename P5
>
class F
, typename Tag = void_
>
struct quote5
{
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template<>
struct advance_backward<0>
{
@@ -14,6 +15,7 @@ struct advance_backward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_backward<1>
typedef typename iter0::prior iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_backward<2>
typedef typename iter1::prior iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_backward<3>
typedef typename iter2::prior iter3;
typedef iter3 type;
};
};
template<>
@@ -64,6 +69,7 @@ struct advance_backward<4>
typedef typename iter3::prior iter4;
typedef iter4 type;
};
};
template< long N >
@@ -6,6 +6,7 @@ namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template<>
struct advance_forward<0>
{
@@ -14,6 +15,7 @@ struct advance_forward<0>
typedef Iterator iter0;
typedef iter0 type;
};
};
template<>
@@ -25,6 +27,7 @@ struct advance_forward<1>
typedef typename iter0::next iter1;
typedef iter1 type;
};
};
template<>
@@ -37,6 +40,7 @@ struct advance_forward<2>
typedef typename iter1::next iter2;
typedef iter2 type;
};
};
template<>
@@ -50,6 +54,7 @@ struct advance_forward<3>
typedef typename iter2::next iter3;
typedef iter3 type;
};
};
template<>
@@ -64,9 +69,10 @@ struct advance_forward<4>
typedef typename iter3::next iter4;
typedef iter4 type;
};
};
template< long N >
template< long N >
struct advance_forward
{
template< typename Iterator > struct apply

Some files were not shown because too many files have changed in this diff Show More