mirror of
https://github.com/boostorg/mpl.git
synced 2026-08-09 15:12:10 +02:00
Compare commits
110 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 60dc0fbfa6 | |||
| 5e3267bf29 | |||
| f8d40123af | |||
| 232a2f9048 | |||
| 9e8baa64f1 | |||
| d2a29ae36b | |||
| 52a0676691 | |||
| 3f839a6698 | |||
| 584e2797cb | |||
| 9b4e6c74d5 | |||
| 9f515e90a6 | |||
| 648b830d58 | |||
| b70e276a01 | |||
| ccc17b58e4 | |||
| efb20a69be | |||
| 75bc9954e4 | |||
| 3113b339d4 | |||
| 5a8aba52c9 | |||
| fc43895f9e | |||
| 1d98500581 | |||
| 0e5522e837 | |||
| 43af4b3bea | |||
| f4c12dbfdc | |||
| d10783cb1a | |||
| e95cad3d01 | |||
| e9b1a7ef7f | |||
| d1a2e748f8 | |||
| b8440aeef8 | |||
| 4687267d09 | |||
| d934b4944f | |||
| 44fd2878bf | |||
| e513af9490 | |||
| 67c98297b6 | |||
| 58f6a455f9 | |||
| dafe4fae8b | |||
| f9784f1e19 | |||
| d888228aa9 | |||
| b4851a6eb3 | |||
| 8ac7e401ed | |||
| 9a289b279b | |||
| 9eb621c516 | |||
| d4cedca95e | |||
| 7888b48ac2 | |||
| 87694f633d | |||
| ce8329aa07 | |||
| 9233e89c10 | |||
| 73f1057426 | |||
| 6e55132748 | |||
| 74d4e978f9 | |||
| f449ec368c | |||
| b842e17901 | |||
| c159a0d3ce | |||
| c62645ac2b | |||
| 5a060a51ce | |||
| 8065e071f7 | |||
| 6d3dae7102 | |||
| bb3f38f02b | |||
| 319ef0fffe | |||
| f5db13e0f0 | |||
| d49590c199 | |||
| b8a4930412 | |||
| bc30ed2002 | |||
| 6dc817c68a | |||
| cf220da789 | |||
| 406ae7d211 | |||
| 567c490a97 | |||
| 65605933d4 | |||
| daf876a550 | |||
| 85c3973c33 | |||
| b275b77f0e | |||
| f33185ee8b | |||
| 21da573b09 | |||
| bf4b55d66a | |||
| 312a42e658 | |||
| fdaf890633 | |||
| 5a7c65a762 | |||
| 8688164a11 | |||
| 72a8746969 | |||
| b7aa079241 | |||
| e44d098414 | |||
| 6337bf66de | |||
| 92a396c893 | |||
| a131b28904 | |||
| 14d8c7b9ec | |||
| 2b691fc6c3 | |||
| 1a48cd1714 | |||
| c852ca8d41 | |||
| d1a4ff6bc5 | |||
| 4b05246d3d | |||
| a17353cd8f | |||
| 3bdab8a641 | |||
| e4c699664e | |||
| d808e1fff1 | |||
| 2a5b68c117 | |||
| d1a899970f | |||
| b54f8d755b | |||
| 696f056592 | |||
| a69baa5eae | |||
| 747dae9e6c | |||
| bbcf7e9294 | |||
| db4f1d99cb | |||
| f856111c60 | |||
| 545c0ece08 | |||
| 4c750b8152 | |||
| b43fe08bf2 | |||
| 6b51ae816b | |||
| 014b9da96b | |||
| cb8e80b207 | |||
| 27a10bcadb | |||
| 293c471a6d |
+10
-6
@@ -1,11 +1,15 @@
|
||||
@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
|
||||
if "%3" == "" goto usage
|
||||
|
||||
: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
|
||||
msxsl.exe %3.xml ..\..\..\..\..\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
|
||||
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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
@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
|
||||
@@ -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 : N1, N2 {};
|
||||
struct type : T1, T2 {};
|
||||
};
|
||||
|
||||
// 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> class F
|
||||
template<typename,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> class F >
|
||||
template< template<typename,typename> class F >
|
||||
struct compose_self
|
||||
{
|
||||
template<
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
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/
|
||||
@@ -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>
|
||||
@@ -0,0 +1,58 @@
|
||||
<!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> Expression </th><th> Expression type </th></tr>
|
||||
<tr><td><code>has_key<s,k>::type</code></td><td>A model of boolean <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
|
||||
<tr><td><code>count<s,k>::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
|
||||
<tr><td><code>order<s,k>::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<s,k>::type</code></td><td>A type </td></tr>
|
||||
<tr><td><code>at<s,k,default>::type</code></td><td>A type </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Expression semantics</h3>
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Complexity </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>has_key<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
||||
<tr><td><code>count<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
||||
<tr><td><code>order<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
||||
<tr><td><code>at<s,k>::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>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!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> Expression </th><th> Expression type </th></tr>
|
||||
<tr><td><code>typename clear<s>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename insert<s,t>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename remove<s,k>::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>
|
||||
@@ -15,7 +15,7 @@ An Extensible Sequence is either a <a href="./Forward_Sequence.html">Forward Seq
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th></tr>
|
||||
<tr><td><code>typename clear<s>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename insert<s,pos,T>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename insert<s,pos,t>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename erase<s,pos>::type</code></td><td>A model of concept of <code>s</code> </td></tr>
|
||||
<tr><td><code>typename erase<s,first,last>::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 July 16, 2002 6:27 pm</body></html>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited May 2, 2003 4:54 am</body></html>
|
||||
@@ -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 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>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>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 July 15, 2002 10:48 am</body></html>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited April 21, 2003 4:14 pm</body></html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!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>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!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> Expression </th><th> Return type </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> Expression </th><th> Complexity </th><th> Precondition </th><th> Semantics </th><th> Postcondition </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>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::BOOST_MPL_AUX_LAMBDA_SUPPORT</title>
|
||||
<link rel="stylesheet" href="../mpl_wiki.css">
|
||||
</head><body bgcolor="white">
|
||||
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>BOOST_MPL_AUX_LAMBDA_SUPPORT</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(arity, fun, params) \
|
||||
<em>unspecified token sequence</em> \
|
||||
/**/
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Broken compiler workaround macro, enables metafunction <code>fun</code> for the use in lambda expressions on compilers that don't support partial template specialization or/and template template parameters. Expands to nothing on conforming compilers.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/aux_/lambda_support.hpp">boost/mpl/aux_/lambda_support.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Description </th></tr>
|
||||
<tr><td><code>arity</code></td><td>The metafunction's arity, i.e. the number of its template parameters, including the defaults. </td></tr>
|
||||
<tr><td><code>fun</code></td><td>The metafunction's name. </td></tr>
|
||||
<tr><td><code>params</code></td><td><a href="http://www.boost.org/libs/preprocessor/doc/index.html">PP</a>-tuple of the metafunction's parameter names, in their original order. </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template< typename T, typename U = int > struct f
|
||||
{
|
||||
typedef T type[sizeof(U)];
|
||||
<p>
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,f,(T,U))
|
||||
};
|
||||
<p>
|
||||
typedef lambda< f<char,_1> >::type f_; <span class="cxx-comment">// use f in a lambda expression</span>
|
||||
typedef apply1<f_,long>::type res;
|
||||
BOOST_MPL_ASSERT_IS_SAME(res, char[sizeof(long)]);
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Macros.html">Macros</a>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited November 12, 2003 1:29 am</body></html>
|
||||
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical and</em> (<code>&&</code
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef and_<f1,f2,..,fn>::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Returns <code>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> are not evaluated.</td><td></td></tr>
|
||||
<tr><td><code>and_<f1,f2,..,fn></code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td><code>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> are not evaluated.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
@@ -50,13 +50,13 @@ template< typename T > struct fail
|
||||
typedef typename T::nonexistent type;
|
||||
};
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_ >::type::value == false));
|
||||
BOOST_STATIC_ASSERT((and_< false_,fail<int> >::type::value == false)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_,fail<int> >::type::value == false)); <span class="cxx-comment">// OK too</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_ >::value == false));
|
||||
BOOST_STATIC_ASSERT((and_< false_,fail<int> >::value == false)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((and_< true_,false_,fail<int> >::value == false)); <span class="cxx-comment">// OK too</span>
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/or.html">or_</a></code>, <code><a href="../Reference/not.html">not_</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:21 am</body></html>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:13 am</body></html>
|
||||
@@ -51,8 +51,8 @@ Linear. Exactly <code><a href="../Reference/size.html">size</a><Sequence>:
|
||||
typedef <a href="../Reference/vector_c.html">vector_c</a><int,0,1,2,3,4,5,6,7,8,9> numbers;
|
||||
typedef copy<
|
||||
<a href="../Reference/range_c.html">range_c</a><int,10,20>
|
||||
, <a href="../Reference/push_back.html">push_back</a><_,_>
|
||||
, numbers
|
||||
, <a href="../Reference/push_back.html">push_back</a><_,_>
|
||||
>::type result;
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT(<a href="../Reference/size.html">size</a><result>::value == 20);
|
||||
@@ -67,4 +67,4 @@ BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a>< result,<a h
|
||||
<p>
|
||||
<a href="../Algorithms.html">Algorithms</a>, <code><a href="../Reference/copy_if.html">copy_if</a></code>, <code><a href="../Reference/copy_backward.html">copy_backward</a></code>, <code><a href="../Reference/copy_backward_if.html">copy_backward_if</a></code>, <code><a href="../Reference/fold.html">fold</a></code>, <code><a href="../Reference/fold_backward.html">fold_backward</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 19, 2002 2:10 am</body></html>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited May 20, 2003 1:36 am</body></html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::is_sequence</title>
|
||||
<link rel="stylesheet" href="../mpl_wiki.css">
|
||||
</head><body bgcolor="white">
|
||||
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>is_sequence</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
struct is_sequence
|
||||
{
|
||||
typedef <em>unspecified</em> type;
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
Returns an <a href="../Integral_Constant.html">Integral Constant</a> <code>c</code> such that <code>c::value == true</code> if and only if <code>T</code> is a model of <a href="../Sequence.html">Sequence</a>.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/is_sequence.hpp">boost/mpl/is_sequence.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>T</code></td><td>A type</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Expression semantics</h3>
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef is_sequence<T>::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef <a href="../Reference/not.html">not_</a>< is_same< <a href="../Reference/begin.html">begin</a><T>::type,void_ > >::type c;</code></td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
Amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
struct UDT {};
|
||||
BOOST_STATIC_ASSERT( !is_sequence<int>::value );
|
||||
BOOST_STATIC_ASSERT( !is_sequence<UDT>::value );
|
||||
BOOST_STATIC_ASSERT( is_sequence< <a href="../Reference/list.html">list</a><> >::value );
|
||||
BOOST_STATIC_ASSERT( is_sequence< <a href="../Reference/vector.html">vector</a><> >::value );
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Sequence.html">Sequence</a>, <code><a href="../Reference/begin.html">begin</a></code>, <code><a href="../Reference/end.html">end</a></code>, <code>as_sequence</code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 1, 2003 4:08 pm</body></html>
|
||||
@@ -34,18 +34,18 @@ Returns the result of <em>logical not</em> (<code>!</code>) operation on its arg
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef not_<f>::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef bool_<(!f::type::value)> c;</code></td><td></td></tr>
|
||||
<tr><td><code>not_<f></code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>bool_<(!f::type::value)></code></td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
BOOST_STATIC_ASSERT(not_<true_>::type::value == false);
|
||||
BOOST_STATIC_ASSERT(not_<false_>::type::value == true);
|
||||
BOOST_STATIC_ASSERT(not_<true_>::value == false);
|
||||
BOOST_STATIC_ASSERT(not_<false_>::value == true);
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/and.html">and_</a></code>, <code><a href="../Reference/or.html">or_</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:19 am</body></html>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:09 am</body></html>
|
||||
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical or</em> (<code>||</code>) operat
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>typedef or_<f1,f2,..,fn>::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Returns <code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
|
||||
<tr><td><code>or_<f1,f2,..,fn></code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td><code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
@@ -50,13 +50,13 @@ template< typename T > struct fail
|
||||
typedef typename T::nonexistent type;
|
||||
};
|
||||
<p>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_ >::type::value == true));
|
||||
BOOST_STATIC_ASSERT((or_< true_,fail<int> >::type::value == true)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_,fail<int> >::type::value == true)); <span class="cxx-comment">// OK too</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_ >::value == true));
|
||||
BOOST_STATIC_ASSERT((or_< true_,fail<int> >::value == true)); <span class="cxx-comment">// OK, fail<int> is never invoked</span>
|
||||
BOOST_STATIC_ASSERT((or_< false_,true_,fail<int> >::value == true)); <span class="cxx-comment">// OK too</span>
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/and.html">and_</a></code>, <code><a href="../Reference/not.html">not_</a></code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:18 am</body></html>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:14 am</body></html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<!doctype html public "-//ietf//dtd html//en">
|
||||
<html><head><title>boost::mpl::rational_c</title>
|
||||
<link rel="stylesheet" href="../mpl_wiki.css">
|
||||
</head><body bgcolor="white">
|
||||
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>rational_c</h1><h3>Synopsis</h3>
|
||||
<p>
|
||||
<pre>
|
||||
template<
|
||||
typename IntegerType
|
||||
, IntegerType N
|
||||
, IntegerType D = 1
|
||||
>
|
||||
struct rational_c
|
||||
{
|
||||
typedef rational_c<IntegerType, N, D> type;
|
||||
typedef IntegerType integer_type;
|
||||
typedef integral_c<IntegerType,N> numerator;
|
||||
typedef integral_c<IntegerType,D> denominator;
|
||||
<p>
|
||||
static double value();
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
<p>
|
||||
<h3>Description</h3>
|
||||
<p>
|
||||
A model of <a href="../Rational_Constant.html">Rational Constant</a>.
|
||||
<p>
|
||||
<h3>Definition</h3>
|
||||
<p>
|
||||
<pre>
|
||||
#include "<a href="../../../../../boost/mpl/math/rational_c.hpp">boost/mpl/math/rational_c.hpp</a>"
|
||||
</pre>
|
||||
<p>
|
||||
<h3>Parameters</h3>
|
||||
<table border="1">
|
||||
<tr><th> Parameter </th><th> Requirement </th><th> Description </th></tr>
|
||||
<tr><td><code>IntegerType</code></td><td>An integral type</td><td>Type used to represent numerator and denominator. </td></tr>
|
||||
<tr><td><code>N</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of numerator. </td></tr>
|
||||
<tr><td><code>D</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of denominator. </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Expression semantics</h3>
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr><th> Expression </th><th> Expression type </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
||||
<tr><td><code>rational_c<T,n,d>::value()</code></td><td><code>double</code></td><td><code>static_cast<T>(d) != 0</code></td><td>Returns <code>static_cast<double>(static_cast<T>(n)) / static_cast<T>(d)</code>.</td><td></td></tr>
|
||||
</table>
|
||||
<p>
|
||||
<h3>Complexity</h3>
|
||||
<p>
|
||||
All operations take amortized constant time.
|
||||
<p>
|
||||
<h3>Example</h3>
|
||||
<p>
|
||||
<pre>
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><int,1,2> half;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><int,2,4> half_2;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><long,9,15> three_fiths_3;
|
||||
typedef rational_plus<three_fiths,half>::type eleven_tenth;
|
||||
typedef rational_plus<half,half>::type one;
|
||||
typedef <a href="../Reference/rational_c.html">rational_c</a><long,1,8> eighth;
|
||||
typedef rational_minus<half,eighth>::type three_eighths;
|
||||
typedef rational_multiplies<half,eighth>::type sixteenth;
|
||||
typedef rational_divides<eighth,half>::type quarter;
|
||||
</pre>
|
||||
<p>
|
||||
<h3>See also</h3>
|
||||
<p>
|
||||
<a href="../Rational_Constant.html">Rational Constant</a>, <a href="../Integral_Constant.html">Integral Constant</a>, <code>integral_c</code>
|
||||
<p><hr>
|
||||
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited October 30, 2003 2:44 am</body></html>
|
||||
+14
-3
@@ -11,6 +11,11 @@
|
||||
<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>
|
||||
@@ -20,6 +25,12 @@
|
||||
<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>
|
||||
@@ -30,10 +41,10 @@
|
||||
<li>as_sequence
|
||||
</ul>
|
||||
<p>
|
||||
<h4>Metafunctions</h4>
|
||||
<h4>Intrinsic Metafunctions</h4>
|
||||
<ul>
|
||||
<li><a href="./Reference/begin.html">begin</a>/<a href="./Reference/end.html">end</a>
|
||||
<li>is_sequence
|
||||
<li><a href="./Reference/is_sequence.html">is_sequence</a>
|
||||
<li><a href="./Reference/size.html">size</a>
|
||||
<li><a href="./Reference/empty.html">empty</a>
|
||||
<li><a href="./Reference/front.html">front</a>
|
||||
@@ -50,4 +61,4 @@
|
||||
</ul>
|
||||
<p>
|
||||
<p><hr>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:07 am</body></html>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 1, 2003 3:47 pm</body></html>
|
||||
@@ -8,8 +8,9 @@
|
||||
<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 March 10, 2003 1:32 am</body></html>
|
||||
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited November 6, 2003 11:39 am</body></html>
|
||||
@@ -0,0 +1,28 @@
|
||||
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()
|
||||
@@ -0,0 +1,7 @@
|
||||
doctype: loose
|
||||
tidy-mark: no
|
||||
wrap: 0
|
||||
wrap-attributes: no
|
||||
enclose-text: yes
|
||||
drop-empty-paras: no
|
||||
quiet: yes
|
||||
@@ -197,10 +197,12 @@ 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)
|
||||
@@ -240,16 +242,18 @@ struct BOOST_PP_CAT(apply,i)
|
||||
};
|
||||
|
||||
# else
|
||||
// ISO98 C++
|
||||
// ISO98 C++, with minor concession to vc7
|
||||
|
||||
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)
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/advance_backward.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2000-02
|
||||
|
||||
#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
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -13,13 +19,8 @@
|
||||
// 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.
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#include "boost/mpl/aux_/apply.hpp"
|
||||
#include "boost/mpl/aux_/prior.hpp"
|
||||
@@ -27,8 +28,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"
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/advance_forward.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2000-02
|
||||
|
||||
#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
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -13,13 +19,8 @@
|
||||
// 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.
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#include "boost/mpl/aux_/apply.hpp"
|
||||
#include "boost/mpl/aux_/next.hpp"
|
||||
@@ -27,8 +28,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,11 +71,6 @@ 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
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#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 {
|
||||
|
||||
@@ -19,10 +19,14 @@
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \
|
||||
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|
||||
&& !defined(BOOST_MPL_NO_BIND_TEMPLATE)
|
||||
#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)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_NO_BIND_TEMPLATE
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300
|
||||
# define BOOST_MPL_COMPILER_DIR msvc70
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
#elif defined(__GNUC__) && !defined(__EDG_VERSION__)
|
||||
# define BOOST_MPL_COMPILER_DIR gcc
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|
||||
&& !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
#if !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
|
||||
|
||||
# define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
#endif
|
||||
|
||||
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp"
|
||||
|
||||
@@ -24,11 +24,15 @@
|
||||
// template< typename T > struct b;
|
||||
// template< typename T, T n > struct b< a<T,n> > {};
|
||||
|
||||
#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)
|
||||
#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)) \
|
||||
)
|
||||
|
||||
# define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||
|
||||
@@ -25,17 +25,25 @@
|
||||
// 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(__BORLANDC__) && __BORLANDC__ >= 0x560 && \
|
||||
(__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|
||||
&& !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
#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))
|
||||
|
||||
# define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
|
||||
|
||||
#endif
|
||||
|
||||
#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)
|
||||
|
||||
#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) \
|
||||
)
|
||||
|
||||
# define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/config/overload_resolution.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002
|
||||
|
||||
#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
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -13,16 +15,19 @@
|
||||
// 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.
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||
#include "boost/mpl/aux_/config/workaround.hpp"
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|
||||
|| BOOST_WORKAROUND(__MWERKS__, < 0x3001) \
|
||||
)
|
||||
|
||||
#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
|
||||
|
||||
@@ -1,30 +1,38 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
#include "boost/config.hpp"
|
||||
// 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)) \
|
||||
)
|
||||
|
||||
#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
|
||||
|
||||
@@ -19,16 +19,23 @@
|
||||
|
||||
#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(__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)
|
||||
|
||||
#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)) \
|
||||
)
|
||||
|
||||
# define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||
|
||||
@@ -20,9 +20,12 @@
|
||||
// agurt, 10/jul/02: full-fledged __typeof is needed to permit the optimal
|
||||
// vector implementation
|
||||
|
||||
#if defined(__MWERKS__) && __MWERKS__ >= 0x3001 \
|
||||
&& !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL)
|
||||
#if !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& defined(__MWERKS__) && __MWERKS__ >= 0x3001
|
||||
|
||||
# define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
#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
|
||||
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2001-02
|
||||
// Copyright (c) 2001-03
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -17,14 +17,16 @@
|
||||
#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 {
|
||||
|
||||
template< typename Iterator >
|
||||
struct deref_wknd
|
||||
# if defined(BOOST_MPL_MSVC_60_ETI_BUG)
|
||||
|
||||
template< typename Iterator > struct deref_wknd
|
||||
{
|
||||
typedef typename Iterator::type type;
|
||||
};
|
||||
@@ -34,14 +36,40 @@ 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) aux::deref_wknd<iter>::type
|
||||
# define BOOST_MPL_AUX_DEREF_WNKD(iter) ::boost::mpl::aux::deref_wknd<iter>::type
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_DEREF_WNKD(iter) iter::type
|
||||
|
||||
#endif
|
||||
#endif // BOOST_MPL_MSVC_ETI_BUG
|
||||
|
||||
#endif // BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -1,9 +1,15 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/full_lambda.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2001-02
|
||||
|
||||
#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
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -13,13 +19,8 @@
|
||||
// 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.
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include "boost/mpl/lambda_fwd.hpp"
|
||||
@@ -81,6 +82,7 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity<T>::value >)
|
||||
>
|
||||
@@ -92,10 +94,11 @@ 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,false_ AUX_ARITY_PARAM(Arity)>
|
||||
: lambda_impl<T,Tag,false_ AUX_ARITY_PARAM(Arity)>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -121,11 +124,11 @@ struct lambda_or< BOOST_MPL_PP_ENUM(n,false) >
|
||||
} // namespace aux
|
||||
#undef n
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(int_<-1>) >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect AUX_ARITY_PARAM(int_<-1>) >
|
||||
{
|
||||
BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_)
|
||||
typedef arg<N> type;
|
||||
typedef mpl::arg<N> type; // qualified for the sake of MIPSpro 7.41
|
||||
};
|
||||
|
||||
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
|
||||
@@ -135,8 +138,8 @@ struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(int_<-1>) >
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
//: special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>, Protect AUX_ARITY_PARAM(int_<1>) >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,Protect AUX_ARITY_PARAM(int_<1>) >
|
||||
{
|
||||
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
|
||||
typedef protect<T> type;
|
||||
@@ -145,10 +148,12 @@ struct lambda_impl< protect<T>, 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)>)
|
||||
>
|
||||
@@ -159,9 +164,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(int_<2>) >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
|
||||
{
|
||||
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
|
||||
typedef bind1st<F,T> type;
|
||||
@@ -169,9 +175,10 @@ struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(int_<2>) >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(int_<2>) >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) >
|
||||
{
|
||||
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_)
|
||||
typedef bind2nd<F,T> type;
|
||||
@@ -198,9 +205,10 @@ struct lambda_impl< bind2nd<F,T>, 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)> AUX_ARITY_PARAM(int_<i>) >
|
||||
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, true_ AUX_ARITY_PARAM(int_<i>) >
|
||||
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>) >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -209,19 +217,20 @@ struct lambda< F<AUX_LAMBDA_PARAMS(i, T)> 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)>, Protect AUX_ARITY_PARAM(int_<i>)
|
||||
F<AUX_LAMBDA_PARAMS(i, T)>, Tag, 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)) >::type \
|
||||
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)),Tag >::type \
|
||||
/**/
|
||||
|
||||
typedef BOOST_PP_CAT(bind,i)<
|
||||
BOOST_PP_CAT(quote,i)<F>
|
||||
BOOST_PP_CAT(quote,i)<F,Tag>
|
||||
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||
> type;
|
||||
|
||||
@@ -238,7 +247,7 @@ struct lambda_impl<
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||
>
|
||||
@@ -250,25 +259,27 @@ struct BOOST_PP_CAT(le_result,i)
|
||||
};
|
||||
|
||||
template<
|
||||
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||
typename Tag
|
||||
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||
>
|
||||
struct BOOST_PP_CAT(le_result,i)< true_,false_,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||
struct BOOST_PP_CAT(le_result,i)< true_,Tag,false_,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||
{
|
||||
typedef BOOST_PP_CAT(bind,i)<
|
||||
BOOST_PP_CAT(quote,i)<F>
|
||||
BOOST_PP_CAT(quote,i)<F,Tag>
|
||||
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||
typename Tag
|
||||
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||
>
|
||||
struct BOOST_PP_CAT(le_result,i)< true_,true_,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||
struct BOOST_PP_CAT(le_result,i)< true_,Tag,true_,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||
{
|
||||
typedef protect< BOOST_PP_CAT(bind,i)<
|
||||
BOOST_PP_CAT(quote,i)<F>
|
||||
BOOST_PP_CAT(quote,i)<F,Tag>
|
||||
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
|
||||
> > type;
|
||||
};
|
||||
@@ -276,7 +287,7 @@ struct BOOST_PP_CAT(le_result,i)< true_,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)) > \
|
||||
typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)), Tag > \
|
||||
BOOST_PP_CAT(l,BOOST_PP_INC(i)); \
|
||||
/**/
|
||||
|
||||
@@ -288,10 +299,11 @@ struct BOOST_PP_CAT(le_result,i)< true_,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)>, Protect AUX_ARITY_PARAM(int_<i>)
|
||||
F<AUX_LAMBDA_PARAMS(i, T)>, Tag, Protect AUX_ARITY_PARAM(int_<i>)
|
||||
>
|
||||
{
|
||||
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||
@@ -301,6 +313,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::BOOST_PP_CAT(le_result,i)<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, AUX_LAMBDA_PARAMS(i, l)
|
||||
@@ -316,10 +329,12 @@ 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)>)
|
||||
>
|
||||
{
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#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
|
||||
+163
-107
@@ -1,62 +1,96 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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) && (!defined(__GNUC__) || __GNUC__ == 3)
|
||||
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \
|
||||
&& !BOOST_WORKAROUND(__GNUC__, <= 2) \
|
||||
&& !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x833))
|
||||
|
||||
# if (!defined(BOOST_MSVC) || BOOST_MSVC > 1300)
|
||||
# if !BOOST_WORKAROUND(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)
|
||||
|
||||
# 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) \
|
||||
); \
|
||||
}; \
|
||||
# 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) \
|
||||
); \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
# 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);
|
||||
@@ -69,13 +103,31 @@ namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
struct has_xxx_tag;
|
||||
|
||||
template< typename T >
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
template <class U>
|
||||
struct msvc_incomplete_array
|
||||
{
|
||||
typedef char (&type)[sizeof(U) + 1];
|
||||
};
|
||||
# endif
|
||||
|
||||
template <typename T>
|
||||
struct msvc_is_incomplete
|
||||
{
|
||||
struct incomplete_;
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(void (T::*)()) == sizeof(void (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);
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -86,83 +138,87 @@ 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_NO_MPL_AUX_HAS_XXX
|
||||
# define BOOST_MPL_NO_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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/include_preprocessed.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Copyright (c) 2001-04 Aleksey Gurtovoy
|
||||
//
|
||||
// Copyright (c) 2001-02
|
||||
// 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)
|
||||
//
|
||||
// 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.
|
||||
|
||||
// $Source$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// 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 \
|
||||
aux_/preprocessed/BOOST_MPL_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \
|
||||
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_HEADER)
|
||||
# include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX_PREPROCESSED_HEADER)
|
||||
# undef AUX_PREPROCESSED_HEADER
|
||||
|
||||
#undef BOOST_MPL_PREPROCESSED_HEADER
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
// + file: boost/mpl/aux_/intergal_wrapper.hpp
|
||||
// + last modified: 27/jan/03
|
||||
// + last modified: 12/apr/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_/ice_cast.hpp"
|
||||
#include "boost/mpl/aux_/static_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,7 +33,11 @@
|
||||
#endif
|
||||
|
||||
#if !defined(AUX_WRAPPER_INST)
|
||||
# define AUX_WRAPPER_INST(value) mpl::AUX_WRAPPER_NAME< value >
|
||||
# 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
|
||||
#endif
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
@@ -56,28 +60,33 @@ struct AUX_WRAPPER_NAME
|
||||
// either
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
|
||||
private:
|
||||
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)));
|
||||
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)));
|
||||
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_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;
|
||||
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;
|
||||
#else
|
||||
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;
|
||||
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;
|
||||
#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 this->value; }
|
||||
operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast<AUX_WRAPPER_VALUE_TYPE>(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
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/lambda_no_ctps.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2001-02
|
||||
|
||||
#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
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -13,26 +19,22 @@
|
||||
// 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.
|
||||
|
||||
#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
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#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"
|
||||
@@ -62,7 +64,7 @@ namespace aux {
|
||||
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -74,17 +76,22 @@ template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_imp
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
{
|
||||
// Metafunction forwarding confuses vc6
|
||||
typedef typename 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>
|
||||
{
|
||||
>::template result_<T,Tag>::type type;
|
||||
};
|
||||
|
||||
# undef AUX_LAMBDA_PARAMS
|
||||
@@ -101,32 +108,37 @@ struct lambda
|
||||
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
|
||||
, typename lambda< \
|
||||
typedef typename lambda< \
|
||||
typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i)) \
|
||||
, Tag \
|
||||
, false \
|
||||
>::type \
|
||||
>::type BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
|
||||
/**/
|
||||
|
||||
template<> struct lambda_impl<i,false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||
|
||||
typedef BOOST_PP_CAT(bind,i)<
|
||||
f_
|
||||
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||
, AUX_LAMBDA_PARAMS(i, arg)
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<i,true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||
, AUX_LAMBDA_PARAMS(i, arg)
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#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"
|
||||
@@ -28,9 +29,11 @@
|
||||
# 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>) \
|
||||
> \
|
||||
{ \
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|
||||
|| !defined(BOOST_STRICT_CONFIG)) \
|
||||
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
|
||||
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|
||||
|| defined(__SUNPRO_CC)
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#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
|
||||
@@ -0,0 +1,65 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -17,8 +17,10 @@
|
||||
#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 {
|
||||
@@ -28,7 +30,15 @@ namespace mpl {
|
||||
template< typename Tag >
|
||||
struct pop_front_traits
|
||||
{
|
||||
template< typename Sequence > struct algorithm;
|
||||
template< typename Sequence > struct algorithm
|
||||
// conservatively placed, but maybe should go outside surrounding
|
||||
// braces.
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
{
|
||||
typedef int type;
|
||||
}
|
||||
#endif
|
||||
;
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_front_traits)
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -16,7 +19,6 @@ struct resolve_bind_arg
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename F, typename T > struct bind1st;
|
||||
template< typename F, typename T > struct bind2nd;
|
||||
|
||||
@@ -51,7 +53,6 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -35,7 +38,6 @@ struct replace_unnamed_arg< arg<-1>,Arg >
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename F, typename T > struct bind1st;
|
||||
template< typename F, typename T > struct bind2nd;
|
||||
|
||||
@@ -70,7 +72,6 @@ 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,6 +6,7 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_,Arity >
|
||||
: lambda_impl< T,Tag,false_,Arity >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,10 +54,12 @@ struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Tag
|
||||
, Protect, int_<1>
|
||||
>
|
||||
{
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1>,int_<1> >
|
||||
: lambda_impl< F<T1>,true_,int_<1> >
|
||||
struct lambda< F<T1>,Tag,int_<1> >
|
||||
: lambda_impl< F<T1>,Tag,true_,int_<1> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F< T1>,Protect,int_<1 >
|
||||
struct lambda_impl<
|
||||
F< T1>,Tag,Protect,int_<1 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,10 +147,12 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Tag
|
||||
, Protect, int_<2>
|
||||
>
|
||||
{
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2>,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,true_,int_<2> >
|
||||
struct lambda< F<T1,T2>,Tag,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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>,Protect,int_<2 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2>,Tag,Protect,int_<2 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,10 +243,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -244,16 +262,17 @@ 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>,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
|
||||
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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>,Protect,int_<3 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3>,Tag,Protect,int_<3 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,10 +340,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -334,16 +359,17 @@ 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>,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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>,Protect,int_<4 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,10 +442,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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>,Protect,int_<5 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,10 +562,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -540,22 +579,25 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect,int_<1> >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
, int_<6>
|
||||
>
|
||||
{
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
::boost::mpl::aux::template_arity<T>::value
|
||||
|
||||
, Protect
|
||||
|
||||
>::template result_<T>
|
||||
>::template result_< T,Tag >
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
typedef list0< >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -32,18 +32,16 @@ struct list<
|
||||
>
|
||||
: list1<T0>
|
||||
{
|
||||
typedef list1<T0> type;
|
||||
typedef typename list1<T0>::type 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 list2< T0,T1 > type;
|
||||
typedef typename list2< T0,T1 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -52,7 +50,7 @@ template<
|
||||
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
|
||||
: list3< T0,T1,T2 >
|
||||
{
|
||||
typedef list3< T0,T1,T2 > type;
|
||||
typedef typename list3< T0,T1,T2 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -61,7 +59,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
|
||||
: list4< T0,T1,T2,T3 >
|
||||
{
|
||||
typedef list4< T0,T1,T2,T3 > type;
|
||||
typedef typename list4< T0,T1,T2,T3 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -70,7 +68,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
|
||||
: list5< T0,T1,T2,T3,T4 >
|
||||
{
|
||||
typedef list5< T0,T1,T2,T3,T4 > type;
|
||||
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -80,7 +78,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
|
||||
: list6< T0,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
typedef list6< T0,T1,T2,T3,T4,T5 > type;
|
||||
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -90,7 +88,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
|
||||
: list7< T0,T1,T2,T3,T4,T5,T6 >
|
||||
{
|
||||
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
|
||||
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -100,7 +98,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
|
||||
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||
{
|
||||
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
|
||||
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -110,10 +108,11 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
|
||||
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
{
|
||||
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
|
||||
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type 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,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -16,7 +19,6 @@ struct resolve_bind_arg
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename F, typename T > struct bind1st;
|
||||
template< typename F, typename T > struct bind2nd;
|
||||
|
||||
@@ -51,7 +53,6 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -35,7 +38,6 @@ struct replace_unnamed_arg< arg<-1>,Arg >
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename F, typename T > struct bind1st;
|
||||
template< typename F, typename T > struct bind2nd;
|
||||
|
||||
@@ -70,7 +72,6 @@ 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,6 +6,7 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_,Arity >
|
||||
: lambda_impl< T,Tag,false_,Arity >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,10 +54,12 @@ struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Tag
|
||||
, Protect, int_<1>
|
||||
>
|
||||
{
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1>,int_<1> >
|
||||
: lambda_impl< F<T1>,true_,int_<1> >
|
||||
struct lambda< F<T1>,Tag,int_<1> >
|
||||
: lambda_impl< F<T1>,Tag,true_,int_<1> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F< T1>,Protect,int_<1 >
|
||||
struct lambda_impl<
|
||||
F< T1>,Tag,Protect,int_<1 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,10 +147,12 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Tag
|
||||
, Protect, int_<2>
|
||||
>
|
||||
{
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2>,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,true_,int_<2> >
|
||||
struct lambda< F<T1,T2>,Tag,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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>,Protect,int_<2 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2>,Tag,Protect,int_<2 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,10 +243,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -244,16 +262,17 @@ 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>,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
|
||||
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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>,Protect,int_<3 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3>,Tag,Protect,int_<3 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,10 +340,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -334,16 +359,17 @@ 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>,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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>,Protect,int_<4 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,10 +442,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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>,Protect,int_<5 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,10 +562,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -540,22 +579,25 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect,int_<1> >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
, int_<6>
|
||||
>
|
||||
{
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
::boost::mpl::aux::template_arity<T>::value
|
||||
|
||||
, Protect
|
||||
|
||||
>::template result_<T>
|
||||
>::template result_< T,Tag >
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
typedef list0< >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -32,18 +32,16 @@ struct list<
|
||||
>
|
||||
: list1<T0>
|
||||
{
|
||||
typedef list1<T0> type;
|
||||
typedef typename list1<T0>::type 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 list2< T0,T1 > type;
|
||||
typedef typename list2< T0,T1 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -52,7 +50,7 @@ template<
|
||||
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
|
||||
: list3< T0,T1,T2 >
|
||||
{
|
||||
typedef list3< T0,T1,T2 > type;
|
||||
typedef typename list3< T0,T1,T2 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -61,7 +59,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
|
||||
: list4< T0,T1,T2,T3 >
|
||||
{
|
||||
typedef list4< T0,T1,T2,T3 > type;
|
||||
typedef typename list4< T0,T1,T2,T3 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -70,7 +68,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
|
||||
: list5< T0,T1,T2,T3,T4 >
|
||||
{
|
||||
typedef list5< T0,T1,T2,T3,T4 > type;
|
||||
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -80,7 +78,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
|
||||
: list6< T0,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
typedef list6< T0,T1,T2,T3,T4,T5 > type;
|
||||
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -90,7 +88,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
|
||||
: list7< T0,T1,T2,T3,T4,T5,T6 >
|
||||
{
|
||||
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
|
||||
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -100,7 +98,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
|
||||
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||
{
|
||||
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
|
||||
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -110,10 +108,11 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
|
||||
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
{
|
||||
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
|
||||
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type 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,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -357,6 +360,7 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -454,6 +457,7 @@ 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,6 +6,7 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, typename Arity = int_< aux::template_arity<T>::value >
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_,Arity >
|
||||
: lambda_impl< T,Tag,false_,Arity >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect,int_<-1> >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,10 +54,12 @@ struct lambda_impl< arg<N>,Protect,int_<-1> >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Tag
|
||||
, Protect, int_<1>
|
||||
>
|
||||
{
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1>,int_<1> >
|
||||
: lambda_impl< F<T1>,true_,int_<1> >
|
||||
struct lambda< F<T1>,Tag,int_<1> >
|
||||
: lambda_impl< F<T1>,Tag,true_,int_<1> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F< T1>,Protect,int_<1 >
|
||||
struct lambda_impl<
|
||||
F< T1>,Tag,Protect,int_<1 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,10 +147,12 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Tag
|
||||
, Protect, int_<2>
|
||||
>
|
||||
{
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2>,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,true_,int_<2> >
|
||||
struct lambda< F<T1,T2>,Tag,int_<2> >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_,int_<2> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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>,Protect,int_<2 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2>,Tag,Protect,int_<2 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,10 +243,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -244,16 +262,17 @@ 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>,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_,int_<3> >
|
||||
struct lambda< F<T1,T2,T3>,Tag,int_<3> >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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>,Protect,int_<3 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3>,Tag,Protect,int_<3 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,10 +340,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -334,16 +359,17 @@ 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>,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_,int_<4> >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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>,Protect,int_<4 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4>,Tag,Protect,int_<4 >
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,10 +442,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_,int_<5> >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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>,Protect,int_<5 >
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 >
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,10 +562,12 @@ 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>
|
||||
>
|
||||
{
|
||||
@@ -540,22 +579,25 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect,int_<1> >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
, int_<6>
|
||||
>
|
||||
{
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect,int_<2> >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect,int_<2> >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
::boost::mpl::aux::template_arity<T>::value
|
||||
|
||||
, Protect
|
||||
|
||||
>::template result_<T>
|
||||
>::template result_< T,Tag >
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
typedef list0< >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -32,18 +32,16 @@ struct list<
|
||||
>
|
||||
: list1<T0>
|
||||
{
|
||||
typedef list1<T0> type;
|
||||
typedef typename list1<T0>::type 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 list2< T0,T1 > type;
|
||||
typedef typename list2< T0,T1 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -52,7 +50,7 @@ template<
|
||||
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
|
||||
: list3< T0,T1,T2 >
|
||||
{
|
||||
typedef list3< T0,T1,T2 > type;
|
||||
typedef typename list3< T0,T1,T2 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -61,7 +59,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
|
||||
: list4< T0,T1,T2,T3 >
|
||||
{
|
||||
typedef list4< T0,T1,T2,T3 > type;
|
||||
typedef typename list4< T0,T1,T2,T3 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -70,7 +68,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
|
||||
: list5< T0,T1,T2,T3,T4 >
|
||||
{
|
||||
typedef list5< T0,T1,T2,T3,T4 > type;
|
||||
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -80,7 +78,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
|
||||
: list6< T0,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
typedef list6< T0,T1,T2,T3,T4,T5 > type;
|
||||
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -90,7 +88,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
|
||||
: list7< T0,T1,T2,T3,T4,T5,T6 >
|
||||
{
|
||||
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
|
||||
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -100,7 +98,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
|
||||
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||
{
|
||||
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
|
||||
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -110,10 +108,11 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
|
||||
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
{
|
||||
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
|
||||
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type 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,6 +19,7 @@ struct quote_impl< T,false >
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote1
|
||||
{
|
||||
@@ -32,6 +33,7 @@ struct quote1
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote2
|
||||
{
|
||||
@@ -45,6 +47,7 @@ struct quote2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote3
|
||||
{
|
||||
@@ -58,6 +61,7 @@ struct quote3
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote4
|
||||
{
|
||||
@@ -78,6 +82,7 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote5
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< nttp_long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< nttp_long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -102,7 +101,7 @@ struct advance_forward<4>
|
||||
|
||||
};
|
||||
|
||||
template< nttp_long N >
|
||||
template< nttp_long N >
|
||||
struct advance_forward
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
|
||||
@@ -48,10 +48,11 @@ template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply1
|
||||
: aux::msvc_apply1<F>::template result_<
|
||||
T1
|
||||
>
|
||||
{
|
||||
typedef typename aux::msvc_apply1<F>::template result_<
|
||||
T1
|
||||
>::type type;
|
||||
|
||||
enum { arity = 2 }; typedef F arg1;
|
||||
typedef T1 arg2;
|
||||
friend class apply1_rebind;
|
||||
@@ -94,10 +95,11 @@ template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply2
|
||||
: aux::msvc_apply2<F>::template result_<
|
||||
T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename aux::msvc_apply2<F>::template result_<
|
||||
T1, T2
|
||||
>::type type;
|
||||
|
||||
enum { arity = 3 }; typedef F arg1;
|
||||
typedef T1 arg2;
|
||||
typedef T2 arg3;
|
||||
@@ -141,10 +143,10 @@ template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply3
|
||||
: aux::msvc_apply3<F>::template result_<
|
||||
T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename aux::msvc_apply3<F>::template result_<
|
||||
T1, T2, T3
|
||||
>::type type;
|
||||
enum { arity = 4 }; typedef F arg1;
|
||||
typedef T1 arg2;
|
||||
typedef T2 arg3;
|
||||
@@ -195,10 +197,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;
|
||||
@@ -253,10 +255,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,8 +4,10 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
template< bool >
|
||||
struct resolve_arg_impl
|
||||
{
|
||||
@@ -19,7 +21,7 @@ struct resolve_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct resolve_arg_impl<true>
|
||||
{
|
||||
template<
|
||||
@@ -34,7 +36,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
|
||||
>
|
||||
@@ -45,12 +47,10 @@ 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,6 +80,7 @@ struct is_bind_template_impl<false>
|
||||
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
|
||||
sizeof(aux::yes_tag)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -90,7 +91,6 @@ template< typename T > struct is_bind_template
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
template< bool >
|
||||
struct resolve_arg_impl
|
||||
{
|
||||
@@ -19,7 +21,7 @@ struct resolve_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct resolve_arg_impl<true>
|
||||
{
|
||||
template<
|
||||
@@ -34,7 +36,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
|
||||
>
|
||||
@@ -44,7 +46,7 @@ struct resolve_bind_arg
|
||||
{
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
template< typename T >
|
||||
struct replace_unnamed_arg_impl
|
||||
{
|
||||
template< typename Arg > struct result_
|
||||
@@ -54,7 +56,7 @@ struct replace_unnamed_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct replace_unnamed_arg_impl< arg<-1> >
|
||||
{
|
||||
template< typename Arg > struct result_
|
||||
@@ -64,19 +66,17 @@ 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,6 +106,7 @@ struct is_bind_template_impl<false>
|
||||
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
|
||||
sizeof(aux::yes_tag)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -116,7 +117,6 @@ template< typename T > struct is_bind_template
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
|
||||
|
||||
>
|
||||
struct lambda_impl
|
||||
{
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
|
||||
, typename Tag = void_
|
||||
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_ >
|
||||
: lambda_impl< T,Tag,false_ >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,11 +54,13 @@ struct lambda_impl< arg<N>,Protect >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1> >
|
||||
: lambda_impl< F<T1>,true_ >
|
||||
struct lambda< F<T1>,Tag >
|
||||
: lambda_impl< F<T1>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F<T1>, Protect
|
||||
struct lambda_impl<
|
||||
F<T1>, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,11 +147,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2> >
|
||||
: lambda_impl< F<T1,T2>,true_ >
|
||||
struct lambda< F<T1,T2>,Tag >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,11 +243,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind2< F,T1,T2 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -244,16 +262,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_ >
|
||||
struct lambda< F<T1,T2,T3>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,11 +340,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind3< F,T1,T2,T3 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -334,16 +359,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,11 +442,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,11 +562,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -540,23 +579,26 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
|
||||
, Tag
|
||||
, Protect
|
||||
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,143 +16,183 @@ template< nttp_int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, 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,7 +3,6 @@
|
||||
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
template< nttp_int N > struct list_impl_chooser;
|
||||
}
|
||||
@@ -19,9 +18,9 @@ struct list_impl_chooser<0>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list0<
|
||||
|
||||
> type;
|
||||
typedef typename list0<
|
||||
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,9 +37,9 @@ struct list_impl_chooser<1>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list1<
|
||||
T0
|
||||
> type;
|
||||
typedef typename list1<
|
||||
T0
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -57,9 +56,9 @@ struct list_impl_chooser<2>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list2<
|
||||
T0, T1
|
||||
> type;
|
||||
typedef typename list2<
|
||||
T0, T1
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -76,9 +75,9 @@ struct list_impl_chooser<3>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list3<
|
||||
T0, T1, T2
|
||||
> type;
|
||||
typedef typename list3<
|
||||
T0, T1, T2
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -95,9 +94,9 @@ struct list_impl_chooser<4>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list4<
|
||||
T0, T1, T2, T3
|
||||
> type;
|
||||
typedef typename list4<
|
||||
T0, T1, T2, T3
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -114,9 +113,9 @@ struct list_impl_chooser<5>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list5<
|
||||
T0, T1, T2, T3, T4
|
||||
> type;
|
||||
typedef typename list5<
|
||||
T0, T1, T2, T3, T4
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -133,9 +132,9 @@ struct list_impl_chooser<6>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list6<
|
||||
T0, T1, T2, T3, T4, T5
|
||||
> type;
|
||||
typedef typename list6<
|
||||
T0, T1, T2, T3, T4, T5
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -152,9 +151,9 @@ struct list_impl_chooser<7>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list7<
|
||||
T0, T1, T2, T3, T4, T5, T6
|
||||
> type;
|
||||
typedef typename list7<
|
||||
T0, T1, T2, T3, T4, T5, T6
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -171,9 +170,9 @@ struct list_impl_chooser<8>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list8<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7
|
||||
> type;
|
||||
typedef typename list8<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -190,9 +189,9 @@ struct list_impl_chooser<9>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list9<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8
|
||||
> type;
|
||||
typedef typename list9<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -209,9 +208,9 @@ struct list_impl_chooser<10>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list10<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
|
||||
> type;
|
||||
typedef typename list10<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -244,6 +243,7 @@ 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,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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,10 +49,11 @@ 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;
|
||||
@@ -92,10 +93,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;
|
||||
@@ -136,10 +137,11 @@ 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;
|
||||
@@ -181,10 +183,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;
|
||||
@@ -228,10 +230,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,8 +4,10 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
template< bool >
|
||||
struct resolve_arg_impl
|
||||
{
|
||||
@@ -19,7 +21,7 @@ struct resolve_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct resolve_arg_impl<true>
|
||||
{
|
||||
template<
|
||||
@@ -34,7 +36,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
|
||||
>
|
||||
@@ -45,12 +47,10 @@ 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,6 +80,7 @@ struct is_bind_template_impl<false>
|
||||
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
|
||||
sizeof(aux::yes_tag)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -90,7 +91,6 @@ template< typename T > struct is_bind_template
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
template< bool >
|
||||
struct resolve_arg_impl
|
||||
{
|
||||
@@ -19,7 +21,7 @@ struct resolve_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct resolve_arg_impl<true>
|
||||
{
|
||||
template<
|
||||
@@ -34,7 +36,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
|
||||
>
|
||||
@@ -44,7 +46,7 @@ struct resolve_bind_arg
|
||||
{
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
template< typename T >
|
||||
struct replace_unnamed_arg_impl
|
||||
{
|
||||
template< typename Arg > struct result_
|
||||
@@ -54,7 +56,7 @@ struct replace_unnamed_arg_impl
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
template<>
|
||||
struct replace_unnamed_arg_impl< arg<-1> >
|
||||
{
|
||||
template< typename Arg > struct result_
|
||||
@@ -64,19 +66,17 @@ 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,6 +106,7 @@ struct is_bind_template_impl<false>
|
||||
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
|
||||
sizeof(aux::yes_tag)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -116,7 +117,6 @@ template< typename T > struct is_bind_template
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1st)
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd)
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
|
||||
|
||||
>
|
||||
struct lambda_impl
|
||||
{
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
|
||||
, typename Tag = void_
|
||||
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_ >
|
||||
: lambda_impl< T,Tag,false_ >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,11 +54,13 @@ struct lambda_impl< arg<N>,Protect >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1> >
|
||||
: lambda_impl< F<T1>,true_ >
|
||||
struct lambda< F<T1>,Tag >
|
||||
: lambda_impl< F<T1>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F<T1>, Protect
|
||||
struct lambda_impl<
|
||||
F<T1>, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,11 +147,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2> >
|
||||
: lambda_impl< F<T1,T2>,true_ >
|
||||
struct lambda< F<T1,T2>,Tag >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,11 +243,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind2< F,T1,T2 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -244,16 +262,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_ >
|
||||
struct lambda< F<T1,T2,T3>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,11 +340,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind3< F,T1,T2,T3 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -334,16 +359,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,11 +442,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,11 +562,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -540,23 +579,26 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
|
||||
, Tag
|
||||
, Protect
|
||||
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
::boost::mpl::aux::template_arity<T>::value
|
||||
|
||||
, Protect
|
||||
|
||||
>::template result_<T>
|
||||
>::template result_< T,Tag >
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
template< int N > struct list_impl_chooser;
|
||||
}
|
||||
@@ -19,9 +18,9 @@ struct list_impl_chooser<0>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list0<
|
||||
|
||||
> type;
|
||||
typedef typename list0<
|
||||
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,9 +37,9 @@ struct list_impl_chooser<1>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list1<
|
||||
T0
|
||||
> type;
|
||||
typedef typename list1<
|
||||
T0
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -57,9 +56,9 @@ struct list_impl_chooser<2>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list2<
|
||||
T0, T1
|
||||
> type;
|
||||
typedef typename list2<
|
||||
T0, T1
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -76,9 +75,9 @@ struct list_impl_chooser<3>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list3<
|
||||
T0, T1, T2
|
||||
> type;
|
||||
typedef typename list3<
|
||||
T0, T1, T2
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -95,9 +94,9 @@ struct list_impl_chooser<4>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list4<
|
||||
T0, T1, T2, T3
|
||||
> type;
|
||||
typedef typename list4<
|
||||
T0, T1, T2, T3
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -114,9 +113,9 @@ struct list_impl_chooser<5>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list5<
|
||||
T0, T1, T2, T3, T4
|
||||
> type;
|
||||
typedef typename list5<
|
||||
T0, T1, T2, T3, T4
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -133,9 +132,9 @@ struct list_impl_chooser<6>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list6<
|
||||
T0, T1, T2, T3, T4, T5
|
||||
> type;
|
||||
typedef typename list6<
|
||||
T0, T1, T2, T3, T4, T5
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -152,9 +151,9 @@ struct list_impl_chooser<7>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list7<
|
||||
T0, T1, T2, T3, T4, T5, T6
|
||||
> type;
|
||||
typedef typename list7<
|
||||
T0, T1, T2, T3, T4, T5, T6
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -171,9 +170,9 @@ struct list_impl_chooser<8>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list8<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7
|
||||
> type;
|
||||
typedef typename list8<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -190,9 +189,9 @@ struct list_impl_chooser<9>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list9<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8
|
||||
> type;
|
||||
typedef typename list9<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -209,9 +208,9 @@ struct list_impl_chooser<10>
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef list10<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
|
||||
> type;
|
||||
typedef typename list10<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -244,6 +243,7 @@ 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,7 +3,6 @@
|
||||
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
template< bool > struct quote_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
@@ -22,6 +21,7 @@ template<> struct quote_impl<false>
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote1
|
||||
{
|
||||
@@ -36,6 +36,7 @@ struct quote1
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote2
|
||||
{
|
||||
@@ -50,6 +51,7 @@ struct quote2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote3
|
||||
{
|
||||
@@ -64,6 +66,7 @@ struct quote3
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote4
|
||||
{
|
||||
@@ -85,6 +88,7 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote5
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -357,6 +360,7 @@ 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,6 +4,9 @@
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st)
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
@@ -454,6 +457,7 @@ 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,8 +6,9 @@ namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect = false_
|
||||
|
||||
|
||||
>
|
||||
struct lambda_impl
|
||||
{
|
||||
@@ -17,10 +18,11 @@ struct lambda_impl
|
||||
|
||||
template<
|
||||
typename T
|
||||
|
||||
, typename Tag = void_
|
||||
|
||||
>
|
||||
struct lambda
|
||||
: lambda_impl< T,false_ >
|
||||
: lambda_impl< T,Tag,false_ >
|
||||
{
|
||||
};
|
||||
|
||||
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< int N, typename Protect >
|
||||
struct lambda_impl< arg<N>,Protect >
|
||||
template< int N, typename Tag, typename Protect >
|
||||
struct lambda_impl< arg<N>,Tag,Protect >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef arg<N> type;
|
||||
@@ -52,11 +54,13 @@ struct lambda_impl< arg<N>,Protect >
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind0<F>
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -68,16 +72,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1> >
|
||||
: lambda_impl< F<T1>,true_ >
|
||||
struct lambda< F<T1>,Tag >
|
||||
: lambda_impl< F<T1>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
@@ -90,24 +95,26 @@ struct le_result1
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,false_,F,L1 >
|
||||
struct le_result1< true_,Tag,false_,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,true_,F,L1 >
|
||||
struct le_result1< true_,Tag,true_,F,L1 >
|
||||
{
|
||||
typedef protect< bind1<
|
||||
quote1<F>
|
||||
quote1< F,Tag >
|
||||
, typename L1::type
|
||||
> > type;
|
||||
};
|
||||
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
F<T1>, Protect
|
||||
struct lambda_impl<
|
||||
F<T1>, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value
|
||||
> is_le;
|
||||
|
||||
typedef typename aux::le_result1<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1
|
||||
@@ -138,11 +147,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind1< F,T1 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -155,16 +166,17 @@ struct lambda_impl<
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2> >
|
||||
: lambda_impl< F<T1,T2>,true_ >
|
||||
struct lambda< F<T1,T2>,Tag >
|
||||
: lambda_impl< F<T1,T2>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
@@ -177,24 +189,26 @@ struct le_result2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,false_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,false_,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, 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_,true_,F,L1,L2 >
|
||||
struct le_result2< true_,Tag,true_,F,L1,L2 >
|
||||
{
|
||||
typedef protect< bind2<
|
||||
quote2<F>
|
||||
quote2< F,Tag >
|
||||
, typename L1::type, typename L2::type
|
||||
> > type;
|
||||
};
|
||||
@@ -204,14 +218,15 @@ struct le_result2< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value
|
||||
@@ -219,6 +234,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result2<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2
|
||||
@@ -227,11 +243,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind2< F,T1,T2 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -244,16 +262,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3>,true_ >
|
||||
struct lambda< F<T1,T2,T3>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
@@ -266,24 +285,26 @@ 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_,false_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, 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_,true_,F,L1,L2,L3 >
|
||||
struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
|
||||
{
|
||||
typedef protect< bind3<
|
||||
quote3<F>
|
||||
quote3< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
> > type;
|
||||
};
|
||||
@@ -293,15 +314,16 @@ struct le_result3< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl< T1,Tag > l1;
|
||||
typedef lambda_impl< T2,Tag > l2;
|
||||
typedef lambda_impl< T3,Tag > l3;
|
||||
|
||||
typedef aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -309,6 +331,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result3<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3
|
||||
@@ -317,11 +340,13 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl<
|
||||
bind3< F,T1,T2,T3 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -334,16 +359,17 @@ 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> >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, typename Protect
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
@@ -357,12 +383,13 @@ 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_,false_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> type;
|
||||
@@ -370,12 +397,13 @@ struct le_result4< true_,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_,true_,F,L1,L2,L3,L4 >
|
||||
struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef protect< bind4<
|
||||
quote4<F>
|
||||
quote4< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> > type;
|
||||
@@ -386,16 +414,17 @@ struct le_result4< true_,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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
typedef lambda_impl<T1> l1;
|
||||
typedef lambda_impl<T2> l2;
|
||||
typedef lambda_impl<T3> l3;
|
||||
typedef lambda_impl<T4> l4;
|
||||
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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -404,6 +433,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result4<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4
|
||||
@@ -412,11 +442,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -433,16 +465,17 @@ template<
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda< F<T1,T2,T3,T4,T5> >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ >
|
||||
struct lambda< F<T1,T2,T3,T4,T5>,Tag >
|
||||
: lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
|
||||
{
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Protect
|
||||
typename IsLE, typename Tag, 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
|
||||
>
|
||||
@@ -460,12 +493,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> type;
|
||||
@@ -477,12 +511,13 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 >
|
||||
struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef protect< bind5<
|
||||
quote5<F>
|
||||
quote5< F,Tag >
|
||||
, typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> > type;
|
||||
@@ -497,17 +532,18 @@ 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 >, Protect
|
||||
struct lambda_impl<
|
||||
F< T1,T2,T3,T4,T5 >, Tag, Protect
|
||||
>
|
||||
{
|
||||
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 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 aux::lambda_or<
|
||||
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||
@@ -516,6 +552,7 @@ struct lambda_impl<
|
||||
|
||||
typedef typename aux::le_result5<
|
||||
typename is_le::type
|
||||
, Tag
|
||||
, Protect
|
||||
, F
|
||||
, l1, l2, l3, l4, l5
|
||||
@@ -525,11 +562,13 @@ 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 >
|
||||
, Protect
|
||||
, Tag
|
||||
, Protect
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -540,23 +579,26 @@ struct lambda_impl<
|
||||
};
|
||||
|
||||
// special case for 'protect'
|
||||
template< typename T, typename Protect >
|
||||
struct lambda_impl< protect<T>,Protect >
|
||||
template< typename T, typename Tag, typename Protect >
|
||||
struct lambda_impl< protect<T>,Tag,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 >
|
||||
, Protect
|
||||
|
||||
, Tag
|
||||
, Protect
|
||||
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
@@ -565,9 +607,10 @@ struct lambda_impl<
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind1st<F,T>,Protect >
|
||||
struct lambda_impl< bind1st<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1st< F,T > type;
|
||||
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect >
|
||||
|
||||
template<
|
||||
typename F, typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda_impl< bind2nd<F,T>,Protect >
|
||||
struct lambda_impl< bind2nd<F,T>,Tag,Protect >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2nd< F,T > type;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||
// preprocessed version of 'boost/mpl/aux_/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 > struct result_
|
||||
template< typename T, typename Tag > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
|
||||
|
||||
template<> struct lambda_impl<1, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<1, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > struct result_
|
||||
{
|
||||
typedef typename F::rebind f_;
|
||||
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
|
||||
typedef mpl::protect< bind1<
|
||||
f_
|
||||
, typename lambda< typename F::arg1, false >::type
|
||||
, arg1
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<2, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
|
||||
, arg1, arg2
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<3, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
|
||||
, arg1, arg2, arg3
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<4, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, false>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct lambda_impl<5, true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
template< typename F, typename Tag > 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_
|
||||
|
||||
,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
|
||||
, arg1, arg2, arg3, arg4, arg5
|
||||
> > type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template< typename T, bool Protect = true >
|
||||
template<
|
||||
typename T
|
||||
, typename Tag = void_
|
||||
, bool Protect = true
|
||||
>
|
||||
struct lambda
|
||||
: aux::lambda_impl<
|
||||
::boost::mpl::aux::template_arity<T>::value
|
||||
|
||||
, Protect
|
||||
|
||||
>::template result_<T>
|
||||
>::template result_< T,Tag >
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
typedef list0< >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -32,18 +32,16 @@ struct list<
|
||||
>
|
||||
: list1<T0>
|
||||
{
|
||||
typedef list1<T0> type;
|
||||
typedef typename list1<T0>::type 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 list2< T0,T1 > type;
|
||||
typedef typename list2< T0,T1 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -52,7 +50,7 @@ template<
|
||||
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
|
||||
: list3< T0,T1,T2 >
|
||||
{
|
||||
typedef list3< T0,T1,T2 > type;
|
||||
typedef typename list3< T0,T1,T2 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -61,7 +59,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
|
||||
: list4< T0,T1,T2,T3 >
|
||||
{
|
||||
typedef list4< T0,T1,T2,T3 > type;
|
||||
typedef typename list4< T0,T1,T2,T3 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -70,7 +68,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
|
||||
: list5< T0,T1,T2,T3,T4 >
|
||||
{
|
||||
typedef list5< T0,T1,T2,T3,T4 > type;
|
||||
typedef typename list5< T0,T1,T2,T3,T4 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -80,7 +78,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
|
||||
: list6< T0,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
typedef list6< T0,T1,T2,T3,T4,T5 > type;
|
||||
typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -90,7 +88,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
|
||||
: list7< T0,T1,T2,T3,T4,T5,T6 >
|
||||
{
|
||||
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
|
||||
typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -100,7 +98,7 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
|
||||
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||
{
|
||||
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
|
||||
typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -110,10 +108,11 @@ template<
|
||||
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
|
||||
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
{
|
||||
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
|
||||
typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type 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,6 +19,7 @@ struct quote_impl< T,false >
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote1
|
||||
{
|
||||
@@ -32,6 +33,7 @@ struct quote1
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote2
|
||||
{
|
||||
@@ -45,6 +47,7 @@ struct quote2
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote3
|
||||
{
|
||||
@@ -58,6 +61,7 @@ struct quote3
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote4
|
||||
{
|
||||
@@ -78,6 +82,7 @@ template<
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename Tag = void_
|
||||
>
|
||||
struct quote5
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_backward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_backward<1>
|
||||
typedef typename iter0::prior iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_backward<2>
|
||||
typedef typename iter1::prior iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_backward<3>
|
||||
typedef typename iter2::prior iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,7 +64,6 @@ struct advance_backward<4>
|
||||
typedef typename iter3::prior iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template< long N >
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace mpl {
|
||||
namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
@@ -15,7 +14,6 @@ struct advance_forward<0>
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -27,7 +25,6 @@ struct advance_forward<1>
|
||||
typedef typename iter0::next iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -40,7 +37,6 @@ struct advance_forward<2>
|
||||
typedef typename iter1::next iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -54,7 +50,6 @@ struct advance_forward<3>
|
||||
typedef typename iter2::next iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -69,10 +64,9 @@ 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
Reference in New Issue
Block a user