Compare commits

..

110 Commits

Author SHA1 Message Date
nobody 60dc0fbfa6 This commit was manufactured by cvs2svn to create tag
'Version_1_31_0'.

[SVN r22162]
2004-02-04 15:24:32 +00:00
Dave Abrahams 5e3267bf29 merged from trunk
[SVN r21914]
2004-01-25 14:27:53 +00:00
Aleksey Gurtovoy f8d40123af Merge fixes from the main trunk
[SVN r21842]
2004-01-20 16:26:31 +00:00
Dave Abrahams 232a2f9048 VC7.1+ workaround :(
[SVN r21523]
2004-01-07 05:03:10 +00:00
nobody 9e8baa64f1 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21510]
2004-01-06 13:24:32 +00:00
Dave Abrahams d2a29ae36b merged from trunk
[SVN r21502]
2004-01-05 15:06:10 +00:00
Dave Abrahams 52a0676691 Fix up busted tag replacement
[SVN r21500]
2004-01-05 15:04:58 +00:00
Dave Abrahams 3f839a6698 merged from trunk
[SVN r21489]
2004-01-05 01:26:01 +00:00
Dave Abrahams 584e2797cb Workaround the fact that Intel C++ for Linux #defines __GNUC__
[SVN r21466]
2004-01-03 20:47:15 +00:00
nobody 9b4e6c74d5 This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21427]
2003-12-30 12:10:04 +00:00
Rene Rivera 9f515e90a6 Fix broken links.
[SVN r21400]
2003-12-27 01:05:33 +00:00
Dave Abrahams 648b830d58 added two-sequence forms
[SVN r21238]
2003-12-12 16:16:21 +00:00
Aleksey Gurtovoy b70e276a01 DM workaround
[SVN r21215]
2003-12-10 21:26:11 +00:00
Eric Friedman ccc17b58e4 Workaround for VC7.0 ETI bug.
[SVN r21159]
2003-12-06 04:04:18 +00:00
Aleksey Gurtovoy efb20a69be merge MSVC-specific & no CTPS cases (the former was still ICE-ing sometimes)
[SVN r20928]
2003-11-23 21:33:45 +00:00
Aleksey Gurtovoy 75bc9954e4 MIPSpro 7.41 workaround
[SVN r20807]
2003-11-14 06:55:06 +00:00
Aleksey Gurtovoy 3113b339d4 MIPSpro 7.41 workaround
[SVN r20806]
2003-11-14 06:47:10 +00:00
Aleksey Gurtovoy 5a8aba52c9 VC 7.0 ETI fix
[SVN r20801]
2003-11-13 11:53:32 +00:00
Eric Friedman fc43895f9e MSVC6 and Borland workarounds.
[SVN r20798]
2003-11-13 00:15:15 +00:00
Eric Friedman 1d98500581 Initial release.
[SVN r20797]
2003-11-13 00:14:40 +00:00
Aleksey Gurtovoy 0e5522e837 apply SunOS patch
[SVN r20793]
2003-11-12 08:37:37 +00:00
Aleksey Gurtovoy 43af4b3bea update reference docs
[SVN r20792]
2003-11-12 07:55:12 +00:00
Eric Friedman f4c12dbfdc Added 'common name error' workaround.
[SVN r20781]
2003-11-11 01:03:27 +00:00
Eric Friedman d10783cb1a Added missing dependency.
[SVN r20757]
2003-11-08 11:57:45 +00:00
Eric Friedman e95cad3d01 Simpler implementation.
[SVN r20756]
2003-11-08 11:57:09 +00:00
Eric Friedman e9b1a7ef7f Modified public iter_fold_if behavior.
[SVN r20755]
2003-11-08 11:53:00 +00:00
Eric Friedman d1a2e748f8 Added public interface to iter_fold_if.
[SVN r20716]
2003-11-07 04:30:08 +00:00
Eric Friedman b8440aeef8 Minor fix.
[SVN r20715]
2003-11-07 04:15:09 +00:00
Eric Friedman 4687267d09 1) 'Not found' result is void_; 2) Uses refactored find_if_pred.
[SVN r20714]
2003-11-07 03:49:58 +00:00
Eric Friedman d934b4944f Slightly modified find_if_pred (and refactored into own header).
[SVN r20713]
2003-11-07 03:46:08 +00:00
Aleksey Gurtovoy 44fd2878bf multiset checkin
[SVN r20683]
2003-11-05 15:48:24 +00:00
Eric Friedman e513af9490 Added test: index_of
[SVN r20622]
2003-11-04 01:38:26 +00:00
Eric Friedman 67c98297b6 Initial release.
[SVN r20621]
2003-11-04 01:37:24 +00:00
Dave Abrahams 58f6a455f9 Don't use metafunction forwarding since it confuses vc6/7
[SVN r20494]
2003-10-26 19:09:08 +00:00
Dave Abrahams dafe4fae8b Avoid vc6 confusion from metafunction forwarding
[SVN r20476]
2003-10-24 17:09:08 +00:00
Eric Friedman f9784f1e19 Added max_element, stable_partition, and sort.
[SVN r20451]
2003-10-22 01:03:41 +00:00
Eric Friedman d888228aa9 Migrated from sandbox.
[SVN r20450]
2003-10-22 01:03:06 +00:00
Aleksey Gurtovoy b4851a6eb3 merge MWCW 9.0 fix from RC_1_30_0 branch
[SVN r20360]
2003-10-13 08:14:52 +00:00
Aleksey Gurtovoy 8ac7e401ed fix operator value_type() to work with enums
[SVN r20262]
2003-10-06 11:07:24 +00:00
Eric Friedman 9a289b279b Removed now-duplicated ETI workaround.
[SVN r20221]
2003-09-30 07:16:54 +00:00
Dave Abrahams 9eb621c516 Handle ETI in BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC, since we need to invoke that anyway.
Make is_even work with vc6/7.


[SVN r20122]
2003-09-20 21:27:04 +00:00
Aleksey Gurtovoy d4cedca95e gcc ADL fix for if_
[SVN r20093]
2003-09-18 07:39:27 +00:00
Dave Abrahams 7888b48ac2 Use the import rule
[SVN r19968]
2003-09-08 17:38:49 +00:00
Dave Abrahams 87694f633d Workaround for intel6 "the type of the template partial specialization
template parameter F depends on the type of a template parameter" (or
something) bug.  Re-ordering the partial specialization parameters
fixes it.


[SVN r19944]
2003-09-07 14:45:16 +00:00
Dave Abrahams ce8329aa07 VC 6/7 workarounds
[SVN r19771]
2003-08-25 18:39:20 +00:00
Aleksey Gurtovoy 9233e89c10 msxsl_build.bat tweaks
[SVN r19597]
2003-08-14 14:50:44 +00:00
Aleksey Gurtovoy 73f1057426 check in docs re-generation instructions/resources
[SVN r19596]
2003-08-14 14:48:16 +00:00
Eric Friedman 6e55132748 Added COMMON_NAME_WKND workaround.
[SVN r19575]
2003-08-14 02:16:07 +00:00
Eric Friedman 74d4e978f9 Small fix (for gcc).
[SVN r19541]
2003-08-12 02:22:01 +00:00
Aleksey Gurtovoy f449ec368c undo erroneous changes in advance_* headers
[SVN r19470]
2003-08-06 08:33:20 +00:00
Aleksey Gurtovoy b842e17901 fixes for tagged lambda oversights
[SVN r19451]
2003-08-05 02:13:04 +00:00
Dave Abrahams c159a0d3ce Fixes for mistakes in tagged lambda conversion. Aleksey, I'm not sure if these are really what you intend, but they stop the errors.
[SVN r19436]
2003-08-04 15:42:46 +00:00
Aleksey Gurtovoy c62645ac2b fix preprocessed header name note
[SVN r19418]
2003-08-04 02:21:00 +00:00
Aleksey Gurtovoy 5a060a51ce add support for tagged lambda invocations
[SVN r19417]
2003-08-04 02:03:46 +00:00
Dave Abrahams 8065e071f7 Workaround for a heinous vc7 bug
[SVN r19414]
2003-08-03 11:48:55 +00:00
Aleksey Gurtovoy 6d3dae7102 add template_arity test
[SVN r19407]
2003-08-02 23:17:18 +00:00
Dave Abrahams bb3f38f02b Improved the incomplete type detection workaround for MSVC. It now
works even with the /vmg switch which makes all member pointers the
same size.


[SVN r19402]
2003-08-02 15:58:44 +00:00
Aleksey Gurtovoy 319ef0fffe is_sequence/list fix for MSVC
[SVN r19168]
2003-07-17 09:26:49 +00:00
Eric Friedman f5db13e0f0 Allow DEREF_WNKD outside of mpl namespace.
[SVN r19162]
2003-07-17 00:51:39 +00:00
Aleksey Gurtovoy d49590c199 list<> iteration bug fix
[SVN r18975]
2003-07-08 05:40:14 +00:00
Aleksey Gurtovoy b8a4930412 BOOST_NO_MPL_AUX_HAS_XXX -> BOOST_MPL_NO_AUX_HAS_XXX
[SVN r18974]
2003-07-08 05:10:04 +00:00
Aleksey Gurtovoy bc30ed2002 ETI fix
[SVN r18953]
2003-07-07 06:42:25 +00:00
Aleksey Gurtovoy 6dc817c68a bind1st/bind2nd common name workaround
[SVN r18859]
2003-06-23 12:44:12 +00:00
Aleksey Gurtovoy cf220da789 add missing backslash
[SVN r18857]
2003-06-23 11:43:33 +00:00
Aleksey Gurtovoy 406ae7d211 tools for re-generating preprocessed headers
[SVN r18856]
2003-06-23 11:34:04 +00:00
Dave Abrahams 567c490a97 Fix errors reported by John Torjo <john-at-torjo.com>.
[SVN r18824]
2003-06-17 14:16:16 +00:00
Aleksey Gurtovoy 65605933d4 fix 'size<vector...>' for no-CTPS compilers
[SVN r18786]
2003-06-12 10:52:50 +00:00
Aleksey Gurtovoy daf876a550 is_sequence fix for MSVC 6.5/7.0
[SVN r18785]
2003-06-12 10:17:31 +00:00
Dave Abrahams 85c3973c33 Check in a failing vc7 test.
[SVN r18741]
2003-06-09 11:38:53 +00:00
Aleksey Gurtovoy b275b77f0e fix Borland regression
[SVN r18621]
2003-05-30 23:18:25 +00:00
Aleksey Gurtovoy f33185ee8b fix config for Borland
[SVN r18601]
2003-05-30 00:37:20 +00:00
Aleksey Gurtovoy 21da573b09 add size test
[SVN r18539]
2003-05-26 06:46:17 +00:00
Aleksey Gurtovoy bf4b55d66a make sequence typedefs public
[SVN r18538]
2003-05-26 06:45:39 +00:00
Dave Abrahams 312a42e658 ETI workarounds for vc6
[SVN r18484]
2003-05-21 21:50:30 +00:00
Dave Abrahams fdaf890633 Workarounds for MSVC bugs
[SVN r18483]
2003-05-21 13:39:09 +00:00
Dave Abrahams 5a7c65a762 Pick less-likely names to avoid collisions on broken compilers
[SVN r18471]
2003-05-20 18:59:57 +00:00
Dave Abrahams 8688164a11 Make plus<x,y> into a valid integer constant wrapper
[SVN r18470]
2003-05-20 18:55:44 +00:00
Dave Abrahams 72a8746969 Implemented size for joint_view
[SVN r18469]
2003-05-20 13:04:08 +00:00
Aleksey Gurtovoy b7aa079241 modify type_wrapper for the sake of GCC
[SVN r18382]
2003-05-11 10:48:26 +00:00
Dave Abrahams e44d098414 Used inheritance for syntax-friendly use in conditionals.
[SVN r18374]
2003-05-08 22:22:39 +00:00
Dave Abrahams 6337bf66de initial commit
[SVN r18373]
2003-05-08 22:22:23 +00:00
Aleksey Gurtovoy 92a396c893 restore from the CVS crash
[SVN r18356]
2003-05-08 09:43:23 +00:00
Dave Abrahams a131b28904 restore from disk crash
[SVN r18353]
2003-05-08 02:19:10 +00:00
Beman Dawes 14d8c7b9ec Initial re-commit after CVS disk crash
[SVN r18349]
2003-05-07 20:59:06 +00:00
Aleksey Gurtovoy 2b691fc6c3 basic 'set' operations
[SVN r18342]
2003-05-03 11:13:11 +00:00
Aleksey Gurtovoy 1a48cd1714 set stub implementation
[SVN r18341]
2003-05-03 04:42:21 +00:00
Aleksey Gurtovoy c852ca8d41 set stub implementation
[SVN r18340]
2003-05-03 02:07:24 +00:00
Dave Abrahams d1a4ff6bc5 bug fix
[SVN r18321]
2003-04-28 04:55:23 +00:00
Dave Abrahams 4b05246d3d Lazy evaluation in lambdas
[SVN r18318]
2003-04-27 11:44:15 +00:00
Dave Abrahams a17353cd8f CWPro7 workaround
[SVN r18317]
2003-04-26 14:59:30 +00:00
Aleksey Gurtovoy 3bdab8a641 fix integral constant definition issue
[SVN r18240]
2003-04-12 18:25:44 +00:00
Aleksey Gurtovoy e4c699664e add missing include
[SVN r18233]
2003-04-11 08:55:32 +00:00
Dave Abrahams d808e1fff1 Fixed some config; rationalized # directives, used BOOST_WORKAROUND
[SVN r18227]
2003-04-10 12:45:19 +00:00
Dave Abrahams 2a5b68c117 Added test for BOOST_NO_MPL_AUX_HAS_XXX macro
[SVN r18226]
2003-04-10 12:43:19 +00:00
Dave Abrahams d1a899970f Use Gibbons typeof for Pro8
[SVN r18069]
2003-03-24 02:10:47 +00:00
Aleksey Gurtovoy b54f8d755b update the docs
[SVN r17847]
2003-03-12 14:05:57 +00:00
Aleksey Gurtovoy 696f056592 update the docs
[SVN r17844]
2003-03-12 13:52:13 +00:00
Aleksey Gurtovoy a69baa5eae update the docs
[SVN r17836]
2003-03-12 13:29:12 +00:00
Aleksey Gurtovoy 747dae9e6c remove tabs/update copyright notice
[SVN r17833]
2003-03-12 10:53:42 +00:00
Aleksey Gurtovoy bbcf7e9294 gcc ADL fixes
[SVN r17811]
2003-03-11 11:59:49 +00:00
Aleksey Gurtovoy db4f1d99cb add composite header
[SVN r17810]
2003-03-11 11:59:21 +00:00
Aleksey Gurtovoy f856111c60 make 'bitand_', 'bitor_' and 'bitxor_' binary
[SVN r17809]
2003-03-11 11:58:30 +00:00
Aleksey Gurtovoy 545c0ece08 added test for bitwise ops
[SVN r17808]
2003-03-11 11:55:16 +00:00
Aleksey Gurtovoy 4c750b8152 distance/advance fixes
[SVN r17795]
2003-03-10 02:27:06 +00:00
Aleksey Gurtovoy b43fe08bf2 size_t_c -> size_t renaming
[SVN r17794]
2003-03-09 23:42:58 +00:00
Aleksey Gurtovoy 6b51ae816b fix MSVC degression
[SVN r17790]
2003-03-09 03:51:32 +00:00
Aleksey Gurtovoy 014b9da96b fix some oversights
[SVN r17789]
2003-03-09 02:41:25 +00:00
Aleksey Gurtovoy cb8e80b207 make lambda more EDG-friendly
[SVN r17788]
2003-03-09 02:30:59 +00:00
Ralf W. Grosse-Kunstleve 27a10bcadb MIPSpro compatibility
[SVN r17772]
2003-03-08 00:25:47 +00:00
Aleksey Gurtovoy 293c471a6d restore an old revision for SGI MIPSpro C++
[SVN r17757]
2003-03-07 11:38:59 +00:00
250 changed files with 7246 additions and 2309 deletions
+10 -6
View File
@@ -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
-11
View File
@@ -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
+3 -3
View File
@@ -29,7 +29,7 @@ However, this model is far too limiting: it restricts the metafunction result no
template< typename T1, typename T2 >
struct derive
{
struct type : 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
View File
@@ -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/
+1 -1
View File
@@ -2,6 +2,6 @@
<html><head><title>boost::mpl::Acknowledgements</title>
<link rel="stylesheet" href="./mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="./Table_of_Contents.html"><img src="./mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>Acknowledgements</h1>The format and language of this reference documentation has been greatly influenced by the SGI's <a href="http://www.sgi.com/tech/stl/">[Standard Template Library Programmer's Guide]</a>.
<h1><a href="./Table_of_Contents.html"><img src="./mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>Acknowledgements</h1>The format and language of this reference documentation has been greatly influenced by the SGI's <a href="http://www.sgi.com/tech/stl/">Standard Template Library Programmer's Guide</a>.
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited July 17, 2002 9:04 am</body></html>
+58
View File
@@ -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>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>A model of boolean <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> or <code>void_</code> </td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>A type </td></tr>
<tr><td><code>at&lt;s,k,default&gt;::type</code></td><td>A type </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
</table>
<p>
<p>
<h3>Invariants</h3>
<p>
For any associative sequence <code>s</code> the following invariants always hold:
<ul>
<li>TODO
</ul>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code>set</code>
<li><code>map</code>
<li><code>set_c</code>
</ul>
<p>
<h3>Notes</h3>
<p>
<h3>See also</h3>
<p>
<a href="./Sequences.html">Sequences</a>, <a href="./Forward_Sequence.html">Forward Sequence</a>, <a href="./Extensible_Associative_Sequence.html">Extensible Associative Sequence</a>,
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited October 25, 2003 7:40 am</body></html>
@@ -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>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>typename clear&lt;s&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,t&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename remove&lt;s,k&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
TODO.
<p>
<h3>Invariants</h3>
<p>
For any associative sequence <code>s</code> the following invariants always hold:
<ul>
<li>TODO
</ul>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code>set</code>
<li><code>map</code>
<li><code>set_c</code>
</ul>
<p>
<h3>Notes</h3>
<p>
<h3>See also</h3>
<p>
<a href="./Sequences.html">Sequences</a>, <a href="./Forward_Sequence.html">Forward Sequence</a>, <a href="./Associative_Sequence.html">Associative Sequence</a>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited May 2, 2003 8:24 am</body></html>
+2 -2
View File
@@ -15,7 +15,7 @@ An Extensible Sequence is either a <a href="./Forward_Sequence.html">Forward Seq
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>typename clear&lt;s&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,pos,T&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename insert&lt;s,pos,t&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename erase&lt;s,pos&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
<tr><td><code>typename erase&lt;s,first,last&gt;::type</code></td><td>A model of concept of <code>s</code> </td></tr>
</table>
@@ -37,4 +37,4 @@ See the description of <a href="./Reference/clear.html">clear</a>, <a href="./Re
<p>
<a href="./Sequences.html">Sequences</a>, <code><a href="./Reference/clear.html">clear</a></code>, <code><a href="./Reference/insert.html">insert</a></code>, <code><a href="./Reference/erase.html">erase</a></code>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited 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>
+2 -2
View File
@@ -16,7 +16,7 @@ An Input Iterator is a <a href="./Trivial_Iterator.html">Trivial Iterator</a> th
<li>an input iterator is <em>past-the-end</em> if it points beyond the last element of a sequence; past-the-end iterators are non-dereferenceable;
<li>an input iterator is <em>valid</em> if it is dereferenceable or past-the-end;
<li>an input iterator <code>i</code> is <em>incrementable</em> if there is a "next" iterator, that is, if <code>i::next</code> expression is well-defined; past-the-end iterators are not incrementable;
<li>an input iterator <code>j</code> is <em>reachable</em> from 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>
+24
View File
@@ -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>
+37
View File
@@ -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>&nbsp;Expression&nbsp;</th><th>&nbsp;Return type &nbsp;</th></tr>
<tr><td><code>typename n::integer_type</code></td><td>An <em>integral type</em> </td></tr>
<tr><td><code>typename n::type</code></td><td>A model of <a href="./Rational_Constant.html">Rational Constant</a> </td></tr>
<tr><td><code>typename n::numerator</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> representing the numerator </td></tr>
<tr><td><code>typename n::denominator</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> representing the denominator </td></tr>
<tr><td><code>n::value()</code></td><td>A run-time floating point approximation of <code>n::type</code> </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
</table>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code><a href="./Reference/rational_c.html">rational_c</a></code>
</ul>
<p>
<h3>See also</h3>
<p>
<a href="./Integral_Constant.html">Integral Constant</a>, <code><a href="./Reference/rational_c.html">rational_c</a></code>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited October 30, 2003 2:43 am</body></html>
@@ -0,0 +1,50 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::BOOST_MPL_AUX_LAMBDA_SUPPORT</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>BOOST_MPL_AUX_LAMBDA_SUPPORT</h1><h3>Synopsis</h3>
<p>
<pre>
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(arity, fun, params) \
<em>unspecified token sequence</em> \
/**/
</pre>
<p>
<h3>Description</h3>
<p>
Broken compiler workaround macro, enables metafunction <code>fun</code> for the use in lambda expressions on compilers that don't support partial template specialization or/and template template parameters. Expands to nothing on conforming compilers.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/aux_/lambda_support.hpp">boost/mpl/aux_/lambda_support.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>arity</code></td><td>The metafunction's arity, i.e. the number of its template parameters, including the defaults. </td></tr>
<tr><td><code>fun</code></td><td>The metafunction's name. </td></tr>
<tr><td><code>params</code></td><td><a href="http://www.boost.org/libs/preprocessor/doc/index.html">PP</a>-tuple of the metafunction's parameter names, in their original order. </td></tr>
</table>
<p>
<h3>Example</h3>
<p>
<pre>
template&lt; typename T, typename U = int &gt; struct f
{
typedef T type[sizeof(U)];
<p>
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,f,(T,U))
};
<p>
typedef lambda&lt; f&lt;char,_1&gt; &gt;::type f_; <span class="cxx-comment">// use f in a lambda expression</span>
typedef apply1&lt;f_,long&gt;::type res;
BOOST_MPL_ASSERT_IS_SAME(res, char[sizeof(long)]);
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Macros.html">Macros</a>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited November 12, 2003 1:29 am</body></html>
+5 -5
View File
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical and</em> (<code>&amp;&amp;</code
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef and_&lt;f1,f2,..,fn&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Returns <code>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> are not evaluated.</td><td></td></tr>
<tr><td><code>and_&lt;f1,f2,..,fn&gt;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td><code>false_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to <code>false</code>, and <code>true_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to <code>false</code> are not evaluated.</td><td></td></tr>
</table>
<p>
<h3>Example</h3>
@@ -50,13 +50,13 @@ template&lt; typename T &gt; struct fail
typedef typename T::nonexistent type;
};
<p>
BOOST_STATIC_ASSERT((and_&lt; true_,false_ &gt;::type::value == false));
BOOST_STATIC_ASSERT((and_&lt; false_,fail&lt;int&gt; &gt;::type::value == false)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_,fail&lt;int&gt; &gt;::type::value == false)); <span class="cxx-comment">// OK too</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_ &gt;::value == false));
BOOST_STATIC_ASSERT((and_&lt; false_,fail&lt;int&gt; &gt;::value == false)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((and_&lt; true_,false_,fail&lt;int&gt; &gt;::value == false)); <span class="cxx-comment">// OK too</span>
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/or.html">or_</a></code>, <code><a href="../Reference/not.html">not_</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:21 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:13 am</body></html>
+2 -2
View File
@@ -51,8 +51,8 @@ Linear. Exactly <code><a href="../Reference/size.html">size</a>&lt;Sequence&gt;:
typedef <a href="../Reference/vector_c.html">vector_c</a>&lt;int,0,1,2,3,4,5,6,7,8,9&gt; numbers;
typedef copy&lt;
<a href="../Reference/range_c.html">range_c</a>&lt;int,10,20&gt;
, <a href="../Reference/push_back.html">push_back</a>&lt;_,_&gt;
, numbers
, <a href="../Reference/push_back.html">push_back</a>&lt;_,_&gt;
&gt;::type result;
<p>
BOOST_STATIC_ASSERT(<a href="../Reference/size.html">size</a>&lt;result&gt;::value == 20);
@@ -67,4 +67,4 @@ BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a>&lt; result,<a h
<p>
<a href="../Algorithms.html">Algorithms</a>, <code><a href="../Reference/copy_if.html">copy_if</a></code>, <code><a href="../Reference/copy_backward.html">copy_backward</a></code>, <code><a href="../Reference/copy_backward_if.html">copy_backward_if</a></code>, <code><a href="../Reference/fold.html">fold</a></code>, <code><a href="../Reference/fold_backward.html">fold_backward</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 19, 2002 2:10 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited May 20, 2003 1:36 am</body></html>
+59
View File
@@ -0,0 +1,59 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::is_sequence</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>is_sequence</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename T
&gt;
struct is_sequence
{
typedef <em>unspecified</em> type;
};
</pre>
<p>
<h3>Description</h3>
<p>
Returns an <a href="../Integral_Constant.html">Integral Constant</a> <code>c</code> such that <code>c::value == true</code> if and only if <code>T</code> is a model of <a href="../Sequence.html">Sequence</a>.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/is_sequence.hpp">boost/mpl/is_sequence.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>T</code></td><td>A type</td><td></td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef is_sequence&lt;T&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef <a href="../Reference/not.html">not_</a>&lt; is_same&lt; <a href="../Reference/begin.html">begin</a>&lt;T&gt;::type,void_ &gt; &gt;::type c;</code></td><td></td></tr>
</table>
<p>
<p>
<h3>Complexity</h3>
<p>
Amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
struct UDT {};
BOOST_STATIC_ASSERT( !is_sequence&lt;int&gt;::value );
BOOST_STATIC_ASSERT( !is_sequence&lt;UDT&gt;::value );
BOOST_STATIC_ASSERT( is_sequence&lt; <a href="../Reference/list.html">list</a>&lt;&gt; &gt;::value );
BOOST_STATIC_ASSERT( is_sequence&lt; <a href="../Reference/vector.html">vector</a>&lt;&gt; &gt;::value );
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Sequence.html">Sequence</a>, <code><a href="../Reference/begin.html">begin</a></code>, <code><a href="../Reference/end.html">end</a></code>, <code>as_sequence</code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited July 1, 2003 4:08 pm</body></html>
+4 -4
View File
@@ -34,18 +34,18 @@ Returns the result of <em>logical not</em> (<code>!</code>) operation on its arg
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef not_&lt;f&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>typedef bool_&lt;(!f::type::value)&gt; c;</code></td><td></td></tr>
<tr><td><code>not_&lt;f&gt;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Equivalent to <code>bool_&lt;(!f::type::value)&gt;</code></td><td></td></tr>
</table>
<p>
<h3>Example</h3>
<p>
<pre>
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::type::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::type::value == true);
BOOST_STATIC_ASSERT(not_&lt;true_&gt;::value == false);
BOOST_STATIC_ASSERT(not_&lt;false_&gt;::value == true);
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/and.html">and_</a></code>, <code><a href="../Reference/or.html">or_</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:19 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:09 am</body></html>
+5 -5
View File
@@ -38,7 +38,7 @@ Returns the result of short-circuit <em>logical or</em> (<code>||</code>) operat
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef or_&lt;f1,f2,..,fn&gt;::type c;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td>Returns <code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
<tr><td><code>or_&lt;f1,f2,..,fn&gt;</code></td><td>A model of <code>bool</code> <a href="../Integral_Constant.html">Integral Constant</a></td><td></td><td><code>true_</code> if either of <code>f1::type::value, f2::type::value, .., fn::type::value</code> expressions evaluates to true, and <code>false_</code> otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first <code>fi</code> metafunction that evaluates to true are not evaluated.</td><td></td></tr>
</table>
<p>
<h3>Example</h3>
@@ -50,13 +50,13 @@ template&lt; typename T &gt; struct fail
typedef typename T::nonexistent type;
};
<p>
BOOST_STATIC_ASSERT((or_&lt; false_,true_ &gt;::type::value == true));
BOOST_STATIC_ASSERT((or_&lt; true_,fail&lt;int&gt; &gt;::type::value == true)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_,fail&lt;int&gt; &gt;::type::value == true)); <span class="cxx-comment">// OK too</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_ &gt;::value == true));
BOOST_STATIC_ASSERT((or_&lt; true_,fail&lt;int&gt; &gt;::value == true)); <span class="cxx-comment">// OK, fail&lt;int&gt; is never invoked</span>
BOOST_STATIC_ASSERT((or_&lt; false_,true_,fail&lt;int&gt; &gt;::value == true)); <span class="cxx-comment">// OK too</span>
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Metafunctions.html">Metafunctions</a>, <code><a href="../Reference/and.html">and_</a></code>, <code><a href="../Reference/not.html">not_</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 1:18 am</body></html>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited September 6, 2003 3:14 am</body></html>
+72
View File
@@ -0,0 +1,72 @@
<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::rational_c</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>rational_c</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename IntegerType
, IntegerType N
, IntegerType D = 1
&gt;
struct rational_c
{
typedef rational_c&lt;IntegerType, N, D&gt; type;
typedef IntegerType integer_type;
typedef integral_c&lt;IntegerType,N&gt; numerator;
typedef integral_c&lt;IntegerType,D&gt; denominator;
<p>
static double value();
};
</pre>
<p>
<p>
<h3>Description</h3>
<p>
A model of <a href="../Rational_Constant.html">Rational Constant</a>.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/math/rational_c.hpp">boost/mpl/math/rational_c.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>IntegerType</code></td><td>An integral type</td><td>Type used to represent numerator and denominator. </td></tr>
<tr><td><code>N</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of numerator. </td></tr>
<tr><td><code>D</code></td><td>A compile time integral constant of type <code>IntegerType</code></td><td>Value of denominator. </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>rational_c&lt;T,n,d&gt;::value()</code></td><td><code>double</code></td><td><code>static_cast&lt;T&gt;(d) != 0</code></td><td>Returns <code>static_cast&lt;double&gt;(static_cast&lt;T&gt;(n)) / static_cast&lt;T&gt;(d)</code>.</td><td></td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
All operations take amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;int,1,2&gt; half;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;int,2,4&gt; half_2;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;long,9,15&gt; three_fiths_3;
typedef rational_plus&lt;three_fiths,half&gt;::type eleven_tenth;
typedef rational_plus&lt;half,half&gt;::type one;
typedef <a href="../Reference/rational_c.html">rational_c</a>&lt;long,1,8&gt; eighth;
typedef rational_minus&lt;half,eighth&gt;::type three_eighths;
typedef rational_multiplies&lt;half,eighth&gt;::type sixteenth;
typedef rational_divides&lt;eighth,half&gt;::type quarter;
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Rational_Constant.html">Rational Constant</a>, <a href="../Integral_Constant.html">Integral Constant</a>, <code>integral_c</code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited October 30, 2003 2:44 am</body></html>
+14 -3
View File
@@ -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>
+2 -1
View File
@@ -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>
+28
View File
@@ -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()
+7
View File
@@ -0,0 +1,7 @@
doctype: loose
tidy-mark: no
wrap: 0
wrap-attributes: no
enclose-text: yes
drop-empty-paras: no
quiet: yes
+11 -7
View File
@@ -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)
+16 -15
View File
@@ -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"
+16 -15
View File
@@ -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
+1
View File
@@ -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 {
+7 -3
View File
@@ -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
+1 -1
View File
@@ -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__)
+5 -2
View File
@@ -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
+15 -7
View File
@@ -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
+27 -19
View File
@@ -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
+13 -6
View File
@@ -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
+5 -2
View File
@@ -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
+44
View File
@@ -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
+33 -5
View File
@@ -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
+41
View File
@@ -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
+50 -35
View File
@@ -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)>)
>
{
+38
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -21,7 +21,7 @@
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|| BOOST_WORKAROUND(__GNUC__, < 3)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) T(expr)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3001)
# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
#else
+19 -15
View File
@@ -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
+19 -10
View File
@@ -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
+38 -26
View File
@@ -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;
};
};
+3
View File
@@ -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>) \
> \
{ \
+2 -1
View File
@@ -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 {
+38
View File
@@ -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
+65
View File
@@ -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
+11 -1
View File
@@ -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