|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70539 - in sandbox/local: boost/local libs/local/doc/html libs/local/doc/html/boost/local libs/local/doc/html/boost_local libs/local/doc/qbk libs/local/example
From: lorcaminiti_at_[hidden]
Date: 2011-03-24 21:36:34
Author: lcaminiti
Date: 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
New Revision: 70539
URL: http://svn.boost.org/trac/boost/changeset/70539
Log:
Compiled all examples also with COMPLIANT #defined.
Text files modified:
sandbox/local/boost/local/config.hpp | 4
sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html | 2
sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_COMPLIANT.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html | 2
sandbox/local/libs/local/doc/html/BOOST_LOCAL_TYPEOF.html | 2
sandbox/local/libs/local/doc/html/boost/local/function.html | 2
sandbox/local/libs/local/doc/html/boost_local/Advanced_Topics.html | 150 ++++++++++++++++++++-------------------
sandbox/local/libs/local/doc/html/boost_local/Implementation.html | 4
sandbox/local/libs/local/doc/html/boost_local/Release_Notes.html | 17 ---
sandbox/local/libs/local/doc/html/boost_local/Tutorial.html | 12 +-
sandbox/local/libs/local/doc/html/index.html | 14 +-
sandbox/local/libs/local/doc/qbk/release_notes.qbk | 7 -
sandbox/local/libs/local/example/Jamfile.jam | 14 +++
sandbox/local/libs/local/example/add.cpp | 6
sandbox/local/libs/local/example/add_block.cpp | 2
sandbox/local/libs/local/example/add_block_impl.cpp | 2
sandbox/local/libs/local/example/add_block_va.cpp | 13 +++
sandbox/local/libs/local/example/add_except_va.cpp | 11 ++
sandbox/local/libs/local/example/add_exit.cpp | 2
sandbox/local/libs/local/example/add_exit_impl.cpp | 2
sandbox/local/libs/local/example/add_exit_va.cpp | 13 +++
sandbox/local/libs/local/example/add_function.cpp | 2
sandbox/local/libs/local/example/add_function_va.cpp | 13 +++
sandbox/local/libs/local/example/add_optimizers_va.cpp | 11 ++
sandbox/local/libs/local/example/add_template_va.cpp | 11 ++
sandbox/local/libs/local/example/add_this_va.cpp | 11 ++
sandbox/local/libs/local/example/add_va.cpp | 17 +++
sandbox/local/libs/local/example/add_x_y_default_va.cpp | 11 ++
sandbox/local/libs/local/example/add_x_y_default_with_va.cpp | 11 ++
sandbox/local/libs/local/example/add_x_y_va.cpp | 11 ++
sandbox/local/libs/local/example/doit_va.cpp | 11 ++
sandbox/local/libs/local/example/factorial_va.cpp | 11 ++
sandbox/local/libs/local/example/find_if_va.cpp | 11 ++
sandbox/local/libs/local/example/gcc_access_va.cpp | 11 ++
sandbox/local/libs/local/example/gcc_square_va.cpp | 11 ++
sandbox/local/libs/local/example/gcc_store_va.cpp | 11 ++
sandbox/local/libs/local/example/nesting_va.cpp | 12 ++
sandbox/local/libs/local/example/params_all_va.cpp | 11 ++
sandbox/local/libs/local/example/print_map_va.cpp | 11 ++
sandbox/local/libs/local/example/scope_guards_errno_va.cpp | 11 ++
sandbox/local/libs/local/example/scope_guards_except_va.cpp | 11 ++
sandbox/local/libs/local/example/ten_ep.cpp | 11 ++
sandbox/local/libs/local/example/ten_va.cpp | 11 ++
sandbox/local/libs/local/example/this_va.cpp | 11 ++
sandbox/local/libs/local/example/transform_va.cpp | 11 ++
sandbox/local/libs/local/example/typeof_tpl_va.cpp | 11 ++
sandbox/local/libs/local/example/typeof_va.cpp | 11 ++
sandbox/local/libs/local/example/world_exit_va.cpp | 11 ++
59 files changed, 461 insertions(+), 141 deletions(-)
Modified: sandbox/local/boost/local/config.hpp
==============================================================================
--- sandbox/local/boost/local/config.hpp (original)
+++ sandbox/local/boost/local/config.hpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -50,7 +50,9 @@
#ifndef BOOST_LOCAL_CONFIG_COMPLIANT
#undef BOOST_LOCAL_CONFIG_COMPLIANT
#else
-#define BOOST_LOCAL_CONFIG_COMPLIANT // For doxygen comment above.
+// Undefine and define again for doxygen comment above.
+#undef BOOST_LOCAL_CONFIG_COMPLIANT
+#define BOOST_LOCAL_CONFIG_COMPLIANT
#endif
/**
Modified: sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div>
<div class="refsect1">
-<a name="id915580"></a><h2>Description</h2>
+<a name="id915709"></a><h2>Description</h2>
<p>This macro expands to an expression that can be passed as a single macro parameter even if it contains commas and that evaluates to the specified type at compile-time (see the <a class="link" href="boost_local/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
<p>For example <code class="computeroutput">BOOST_IDENTITY_TYPE((std::map<int, double>))</code> can be passed as a single macro parameter when instead <code class="computeroutput">std::map<int, double></code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
<p><span class="bold"><strong>Parameters:</strong></span> </p>
Modified: sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_IDENTITY_VALUE(parenthesized_value)</pre></div>
<div class="refsect1">
-<a name="id915721"></a><h2>Description</h2>
+<a name="id915850"></a><h2>Description</h2>
<p>This macro expands to an expression that can be passed as a single macro parameter even if it contains commas and that evaluates to the specified value at run-time (see the <a class="link" href="boost_local/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
<p>For example <code class="computeroutput">BOOST_IDENTITY_VALUE((key_sizeof<int, double>::value))</code> can be passed as a single macro parameter when instead <code class="computeroutput">key_sizeof<int, double>::value</code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
<p><span class="bold"><strong>Parameters:</strong></span> </p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK(bindings)</pre></div>
<div class="refsect1">
-<a name="id910531"></a><h2>Description</h2>
+<a name="id910659"></a><h2>Description</h2>
<p>This macro must be used within a declarative context, it must be followed by the local block body code and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></code> macro (see the Tutorial section): </p>
<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
<span class="special">...</span>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK_END</pre></div>
<div class="refsect1">
-<a name="id911268"></a><h2>Description</h2>
+<a name="id911397"></a><h2>Description</h2>
<p>This macro must follow the local block body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code> documentation.</p>
<p><span class="bold"><strong>Note:</strong></span> This macro cannot be used multiple times on the same line because it internally uses the line number <code class="computeroutput">__LINE__</code> to generate unique identifiers.</p>
<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK_TPL(bindings)</pre></div>
<div class="refsect1">
-<a name="id911194"></a><h2>Description</h2>
+<a name="id911323"></a><h2>Description</h2>
<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
</div>
</div>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_COMPLIANT.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_COMPLIANT.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_COMPLIANT.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_COMPLIANT</pre></div>
<div class="refsect1">
-<a name="id911436"></a><h2>Description</h2>
+<a name="id911565"></a><h2>Description</h2>
<p>If programmers leave this configuration macro undefined, its default value is to be left not defined.</p>
<p>If this macro is defined, variadic macros and empty macro parameters are not used by this library. Using variadic macros and empty macro parameters allows this library to provide the <span class="emphasis"><em>variadic macro</em></span> and <span class="emphasis"><em>empty macro</em></span> syntaxes which some programmers might find more readable than the <span class="emphasis"><em>sequencing macro</em></span> syntax (see <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>, and <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>). If this configuration macro is defined then only the sequencing macro syntax is allowed (regardless of whether the compiler supports variadic and e
mpty macros or not).</p>
<p><span class="bold"><strong>Warning:</strong></span> The variadic and empty macro syntaxes are not supported by all C++ compilers so they should be used with care to avoid portability issues (and this configuration macro can be defined to disable them).</p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</pre></div>
<div class="refsect1">
-<a name="id911612"></a><h2>Description</h2>
+<a name="id911741"></a><h2>Description</h2>
<p>If programmers leave this configuration macro undefined, its default value is <code class="computeroutput">5</code>.</p>
<p>This only refers to the number of local function parameters and not to the number of bound variables in scope (the limit on the number of bound variables is instead the maximum size allowed for a Boost.Preprocessor sequences).</p>
<p><span class="bold"><strong>Warning:</strong></span> Increasing this number will increase compilation time.</p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</pre></div>
<div class="refsect1">
-<a name="id911707"></a><h2>Description</h2>
+<a name="id911836"></a><h2>Description</h2>
<p>If programmers leave this configuration macro undefined, the default symbol used is <code class="computeroutput">this_</code>.</p>
<p><span class="bold"><strong>Warning:</strong></span> Programmers should not define this macro unless it is absolutely necessary (e.g., to avoid name clashes with another library which cannot be changed). Changing the symbol <code class="computeroutput">this_</code> effectively changes the public API of this library.</p>
<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Getting_Started.html" title="Getting Started"> Getting Started</a> section. </p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT(binding_list)</pre></div>
<div class="refsect1">
-<a name="id911848"></a><h2>Description</h2>
+<a name="id911976"></a><h2>Description</h2>
<p>This macro must be used within a declarative context, it must be followed by the local exit body code and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></code> macro (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section): </p>
<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
<span class="special">...</span>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT_END</pre></div>
<div class="refsect1">
-<a name="id912596"></a><h2>Description</h2>
+<a name="id912724"></a><h2>Description</h2>
<p>This macro must follow the local exit body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code> documentation.</p>
<p><span class="bold"><strong>Note:</strong></span> This macro cannot be used multiple times on the same line because it internally uses the line number <code class="computeroutput">__LINE__</code> to generate unique identifiers.</p>
<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT_TPL(binding_list)</pre></div>
<div class="refsect1">
-<a name="id912522"></a><h2>Description</h2>
+<a name="id912650"></a><h2>Description</h2>
<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
</div>
</div>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_NAME(name)</pre></div>
<div class="refsect1">
-<a name="id915059"></a><h2>Description</h2>
+<a name="id915188"></a><h2>Description</h2>
<p>This macro must follow the local function body code block <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code> documentation.</p>
<p><span class="bold"><strong>Parameters:</strong></span> </p>
<div class="informaltable"><table class="table">
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_PARAMS(parameters)</pre></div>
<div class="refsect1">
-<a name="id914085"></a><h2>Description</h2>
+<a name="id914214"></a><h2>Description</h2>
<p>This macro must be used within a declarative context, it must follow the local function result type, it must be followed by the local function body code and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a></code> macro (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> and <a class="link" href="boost_local/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> sections): </p>
<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
<span class="special">...</span>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_PARAMS_TPL(parameters)</pre></div>
<div class="refsect1">
-<a name="id914985"></a><h2>Description</h2>
+<a name="id915114"></a><h2>Description</h2>
<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
</div>
</div>
Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_TYPEOF.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_TYPEOF.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_TYPEOF.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_TYPEOF(bound_variable_name)</pre></div>
<div class="refsect1">
-<a name="id915253"></a><h2>Description</h2>
+<a name="id915382"></a><h2>Description</h2>
<p>The type is fully qualified in that it contains the extra constant and reference qualifiers when they are specified for binding by constant and by reference. For example, if a variable named <code class="computeroutput">x</code> of type <code class="computeroutput">T</code> is: </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>Bound by value using <code class="computeroutput">bind x</code> then <code class="computeroutput">BOOST_LOCAL_TYPEOF(x)</code> is <code class="computeroutput">T</code>. </p></li>
Modified: sandbox/local/libs/local/doc/html/boost/local/function.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost/local/function.html (original)
+++ sandbox/local/libs/local/doc/html/boost/local/function.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -35,7 +35,7 @@
<span class="keyword">struct</span> <a class="link" href="function.html" title="Struct template function">function</a> <span class="special">{</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
-<a name="id912957"></a><h2>Description</h2>
+<a name="id913085"></a><h2>Description</h2>
<p>This template defines several specializations to handle a generic number of function parameters some of which can have default values. The number of supported function parameters <code class="computeroutput">N</code> goes from <code class="computeroutput">0</code> (for a function with no parameter) to a maximum of <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code>.</p>
<p>Each template specialization defines call operators <code class="computeroutput">operator()(...)</code> with a different set of parameters to handle the number of default parameters specified by <code class="computeroutput">defaults</code> (see <a class="link" href="../../boost_local/Advanced_Topics.html" title="Advanced Topics">
Advanced Topics</a> section): </p>
Modified: sandbox/local/libs/local/doc/html/boost_local/Advanced_Topics.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Advanced_Topics.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Advanced_Topics.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -738,44 +738,46 @@
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">cassert</span><span class="special">></span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="identifier">T</span> <span class="identifier">total</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">();</span>
- <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
-
- <span class="identifier">T</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS_TPL</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">num</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span>
- <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof for variable declaratin.
-</span> <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">factor</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">f</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
- <span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
-
- <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">T</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
- <span class="identifier">BOOST_LOCAL_EXIT_TPL</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof is qualified with eventual bind's `const` and `&`.
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_const</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special"><</span>
- <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">size</span><span class="special">)>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">s</span><span class="special">;</span>
- <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">size</span><span class="special">;</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">s</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+<span class="keyword">struct</span> <span class="identifier">calculator</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">total</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">();</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">T</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS_TPL</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">num</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span>
+ <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Typeof for variable declaratin.
+</span> <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">factor</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">f</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">T</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="identifier">BOOST_LOCAL_EXIT_TPL</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Typeof is qualified with eventual bind's `const` and `&`.
+</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special"><</span>
+ <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">size</span><span class="special">)>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">size</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">s</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
- <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">y</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">y</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
- <span class="identifier">BOOST_LOCAL_BLOCK_TPL</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="special">&</span><span class="identifier">sum</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">factor</span><span class="special">,</span>
- <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Tyepof for concept checking.
-</span> <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">EqualityComparable</span><span class="special"><</span>
- <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)>));</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">+</span> <span class="identifier">z</span><span class="special">));</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+ <span class="identifier">BOOST_LOCAL_BLOCK_TPL</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="special">&</span><span class="identifier">sum</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">factor</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Tyepof for concept checking.
+</span> <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">EqualityComparable</span><span class="special"><</span>
+ <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)>));</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">+</span> <span class="identifier">z</span><span class="special">));</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
- <span class="keyword">return</span> <span class="identifier">sum</span><span class="special">;</span>
-<span class="special">}</span>
+ <span class="keyword">return</span> <span class="identifier">sum</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
- <span class="identifier">total</span><span class="special">(</span><span class="number">100.0</span><span class="special">,</span> <span class="number">90.5</span><span class="special">,</span> <span class="number">7.0</span><span class="special">);</span>
+ <span class="identifier">calculator</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">total</span><span class="special">(</span><span class="number">100.0</span><span class="special">,</span> <span class="number">90.5</span><span class="special">,</span> <span class="number">7.0</span><span class="special">);</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
@@ -796,44 +798,46 @@
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">cassert</span><span class="special">></span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="identifier">T</span> <span class="identifier">total</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">();</span>
- <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
-
- <span class="identifier">T</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS_TPL</span><span class="special">(</span> <span class="special">(</span><span class="identifier">T</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof for variable declaration.
-</span> <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">factor</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">f</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
- <span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
-
- <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">T</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
- <span class="identifier">BOOST_LOCAL_EXIT_TPL</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof is qualified with eventual bind's `const` and `&`.
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_const</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special"><</span>
- <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">size</span><span class="special">)>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">s</span><span class="special">;</span>
- <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">size</span><span class="special">;</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">s</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+<span class="keyword">struct</span> <span class="identifier">calculator</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">total</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">();</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">T</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS_TPL</span><span class="special">(</span> <span class="special">(</span><span class="identifier">T</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Typeof for variable declaration.
+</span> <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">factor</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">f</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">T</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="identifier">BOOST_LOCAL_EXIT_TPL</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Typeof is qualified with eventual bind's `const` and `&`.
+</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_const</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special"><</span>
+ <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">size</span><span class="special">)>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">size</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">s</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
- <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">y</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">y</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
- <span class="identifier">BOOST_LOCAL_BLOCK_TPL</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="special">&</span><span class="identifier">sum</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">factor</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof for concept checking.
-</span> <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">EqualityComparable</span><span class="special"><</span>
- <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)>));</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">+</span> <span class="identifier">z</span><span class="special">));</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+ <span class="identifier">BOOST_LOCAL_BLOCK_TPL</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="special">&</span><span class="identifier">sum</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">factor</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Typeof for concept checking.
+</span> <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">EqualityComparable</span><span class="special"><</span>
+ <span class="identifier">BOOST_LOCAL_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)>));</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">+</span> <span class="identifier">z</span><span class="special">));</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
- <span class="keyword">return</span> <span class="identifier">sum</span><span class="special">;</span>
-<span class="special">}</span>
+ <span class="keyword">return</span> <span class="identifier">sum</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
- <span class="identifier">total</span><span class="special">(</span><span class="number">100.0</span><span class="special">,</span> <span class="number">90.5</span><span class="special">,</span> <span class="number">7.0</span><span class="special">);</span>
+ <span class="identifier">calculator</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">total</span><span class="special">(</span><span class="number">100.0</span><span class="special">,</span> <span class="number">90.5</span><span class="special">,</span> <span class="number">7.0</span><span class="special">);</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
@@ -1888,14 +1892,14 @@
</tbody>
</table></div>
<a name="boost_local.Advanced_Topics.limitations__overloading__operators__etc_.overloading"></a><h6>
-<a name="id909398"></a>
+<a name="id909526"></a>
<a class="link" href="Advanced_Topics.html#boost_local.Advanced_Topics.limitations__overloading__operators__etc_.overloading">Overloading</a>
</h6>
<p>
It is not possible to overload local functions. Declaring multiple local
functions with the same name within the same enclosing scope generates a
compile-time error (even if the different declarations specify different
- parameters). <sup>[<a name="id909422" href="#ftn.id909422" class="footnote">18</a>]</sup>
+ parameters). <sup>[<a name="id909550" href="#ftn.id909550" class="footnote">18</a>]</sup>
</p>
<p>
For example, the following code will <span class="bold"><strong>not</strong></span>
@@ -1914,12 +1918,12 @@
<span class="special">}</span>
</pre>
<a name="boost_local.Advanced_Topics.limitations__overloading__operators__etc_.operators"></a><h6>
-<a name="id909728"></a>
+<a name="id909856"></a>
<a class="link" href="Advanced_Topics.html#boost_local.Advanced_Topics.limitations__overloading__operators__etc_.operators">Operators</a>
</h6>
<p>
Local functions cannot be operators. Naming a local function <code class="computeroutput"><span class="keyword">operator</span><span class="special">...</span></code>
- will generate a compile-time error. <sup>[<a name="id909765" href="#ftn.id909765" class="footnote">19</a>]</sup>
+ will generate a compile-time error. <sup>[<a name="id909893" href="#ftn.id909893" class="footnote">19</a>]</sup>
</p>
<p>
For example, the following code will <span class="bold"><strong>not</strong></span>
@@ -1940,7 +1944,7 @@
<span class="special">}</span>
</pre>
<a name="boost_local.Advanced_Topics.limitations__overloading__operators__etc_.goto"></a><h6>
-<a name="id910140"></a>
+<a name="id910268"></a>
<a class="link" href="Advanced_Topics.html#boost_local.Advanced_Topics.limitations__overloading__operators__etc_.goto">Goto</a>
</h6>
<p>
@@ -1988,14 +1992,14 @@
(unless template metaprogramming is being used) so this is usually not
a problem.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id909422" href="#id909422" class="para">18</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id909550" href="#id909550" class="para">18</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This is because a local function
is a functor object declared as a local variable within the enclosing scope.
Therefore, declaring two local functions with the same name within the
same enclosing scope declares two local variables with the same name within
the same scope and that is not allowed in C++.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id909765" href="#id909765" class="para">19</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id909893" href="#id909893" class="para">19</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This is the because a local
function name must be a valid local variable name (the local variable to
hold the local functor object) and operators cannot be used as local variable
Modified: sandbox/local/libs/local/doc/html/boost_local/Implementation.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Implementation.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Implementation.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -238,7 +238,7 @@
<span class="comment">// Local block body.
</span> <span class="special">{</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// OK: Complier error if `==` confused with `=`.
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local block (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
@@ -281,7 +281,7 @@
<span class="comment">// Local exit body.
</span> <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local exit (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
Modified: sandbox/local/libs/local/doc/html/boost_local/Release_Notes.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Release_Notes.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Release_Notes.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -68,24 +68,13 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_local.Release_Notes.todo"></a><a class="link" href="Release_Notes.html#boost_local.Release_Notes.todo" title="TODO">TODO</a>
</h3></div></div></div>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
- <span class="bold"><strong>Examples.</strong></span> Compile with COMPLIANT (local
- and/or typeof) defined. Disable va and ep examples if COMPLIANT and/or
- NO_VARIADICS.
- </li>
-<li class="listitem">
- <span class="bold"><strong>Examples.</strong></span> Use std::cout instead of std::clog
- in all examples.
- </li>
-<li class="listitem">
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<span class="bold"><strong>Code.</strong></span> Optimize macro expansion code
for C++0x, C++03, etc. From John Bytheway:
- </li>
-</ol></div>
+ </li></ol></div>
<pre class="programlisting"><span class="special">></span> <span class="identifier">Yes</span><span class="special">,</span> <span class="identifier">in</span> <span class="identifier">C</span><span class="special">++</span><span class="number">0</span><span class="identifier">x</span> <span class="identifier">local</span> <span class="identifier">structs</span> <span class="identifier">can</span> <span class="identifier">be</span> <span class="identifier">passed</span> <span class="identifier">as</span> <span class="keyword">template</span> <span class="identifier">parameters</span><span class="special">.</span>
<span class="special">></span> <span class="identifier">Obviously</span><span class="special">,</span> <span class="identifier">in</span> <span class="identifier">C</span><span class="special">++</span><span class="number">0</span><span class="identifier">x</span> <span class="identifier">there</span> <span class="identifier">are</span> <span class="identifier">lambdas</span> <span class="identifier">too</span><span class="special">,</span> <span class="identifier">so</span> <span class="identifier">you</span> <span class="identifier">might</span> <span class="identifier">think</span> <span class="identifier">your</span>
-<span class="special">></span> <span class="identifier">library</span> <span class="identifier">is</span> <span class="identifier">useless</span><span class="special">,</span> <span class="identifier">but</span> <span class="identifier">I</span><span class="error">'</span><span class="identifier">d</span> <span class="identifier">expect</span> <span class="identifier">most</span> <span class="identifier">compilers</span> <span class="identifier">to</span> <span class="identifier">support</span> <span class="identifier">passing</span>
+<span class="special">></span> <span class="identifier">library</span> <span class="identifier">is</span> <span class="identifier">useless</span><span class="special">,</span> <span class="identifier">but</span> <span class="identifier">I</span> <span class="identifier">would</span> <span class="identifier">expect</span> <span class="identifier">most</span> <span class="identifier">compilers</span> <span class="identifier">to</span> <span class="identifier">support</span> <span class="identifier">passing</span>
<span class="special">></span> <span class="identifier">local</span> <span class="identifier">structs</span> <span class="identifier">as</span> <span class="keyword">template</span> <span class="identifier">parameters</span> <span class="identifier">before</span> <span class="identifier">they</span> <span class="identifier">support</span> <span class="identifier">lambdas</span><span class="special">,</span> <span class="identifier">so</span>
<span class="special">></span> <span class="identifier">there</span> <span class="identifier">is</span> <span class="identifier">some</span> <span class="identifier">advantage</span> <span class="identifier">in</span> <span class="identifier">having</span> <span class="keyword">this</span> <span class="identifier">intermediate</span> <span class="identifier">implementation</span><span class="special">.</span>
<span class="special">></span> <span class="identifier">Also</span><span class="special">,</span> <span class="identifier">your</span> <span class="identifier">macros</span> <span class="identifier">would</span> <span class="identifier">allow</span> <span class="identifier">writing</span> <span class="identifier">code</span> <span class="identifier">that</span> <span class="identifier">worked</span> <span class="identifier">in</span> <span class="identifier">C</span><span class="special">++</span><span class="number">0</span><span class="identifier">x</span> <span class="keyword">and</span>
Modified: sandbox/local/libs/local/doc/html/boost_local/Tutorial.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Tutorial.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Tutorial.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -614,7 +614,7 @@
<span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span>
<span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
<span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
@@ -638,7 +638,7 @@
<span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span>
<span class="special">(</span><span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
<span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
@@ -931,7 +931,7 @@
<span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// OK: Complier error if `==` confused with `=`.
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local block (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
@@ -956,7 +956,7 @@
<span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// OK: Complier error if `==` confused with `=`.
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local block (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
@@ -1056,7 +1056,7 @@
<span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local exit (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
@@ -1082,7 +1082,7 @@
<span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local exit (and not the enclosing scope).
</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
Modified: sandbox/local/libs/local/doc/html/index.html
==============================================================================
--- sandbox/local/libs/local/doc/html/index.html (original)
+++ sandbox/local/libs/local/doc/html/index.html 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -241,7 +241,7 @@
<span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
<span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
@@ -249,7 +249,7 @@
<span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
<span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
<span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
@@ -257,7 +257,7 @@
</span>
<span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// so far `sum` is 10*100+10*90.5+10*7=1975
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
@@ -285,7 +285,7 @@
<span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span>
<span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Summed: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
<span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
@@ -293,7 +293,7 @@
<span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
<span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&&</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Freed array: "</span> <span class="special"><<</span> <span class="identifier">nums</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
<span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
@@ -301,7 +301,7 @@
</span>
<span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// so far `sum` is 10*100+10*90.5+10*7=1975
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Asserted summation: "</span> <span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
@@ -424,7 +424,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 24, 2011 at 15:15:22 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 25, 2011 at 01:28:30 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/local/libs/local/doc/qbk/release_notes.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/release_notes.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/release_notes.qbk 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -28,17 +28,12 @@
[section TODO]
-# *Examples.* Compile with COMPLIANT (local and/or typeof) defined.
-Disable va and ep examples if COMPLIANT and/or NO_VARIADICS.
-
-# *Examples.* Use std::cout instead of std::clog in all examples.
-
# *Code.* Optimize macro expansion code for C++0x, C++03, etc.
From John Bytheway:
> Yes, in C++0x local structs can be passed as template parameters.
> Obviously, in C++0x there are lambdas too, so you might think your
- > library is useless, but I'd expect most compilers to support passing
+ > library is useless, but I would expect most compilers to support passing
> local structs as template parameters before they support lambdas, so
> there is some advantage in having this intermediate implementation.
> Also, your macros would allow writing code that worked in C++0x and
Modified: sandbox/local/libs/local/example/Jamfile.jam
==============================================================================
--- sandbox/local/libs/local/example/Jamfile.jam (original)
+++ sandbox/local/libs/local/example/Jamfile.jam 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,20 @@
# License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
# copy at http://www.boost.org/LICENSE_1_0.txt).
+import feature ;
+
+# `bjam boost_local_config_compliant ...` for pure ISO C++ (no variadic, etc).
+feature.feature boost_local_config_compliant : off on
+ : composite propagated link-incompatible ;
+feature.compose <boost_local_config_compliant>on
+ : <define>BOOST_LOCAL_CONFIG_COMPLIANT ;
+
+# `biam boost_local_compliant_typeof ...` for ISO C++ compliant `typeof`.
+feature.feature boost_local_compliant_typeof : off on
+ : composite propagated link-incompatible ;
+feature.compose <boost_local_compliant_typeof>on
+ : <define>BOOST_TYPEOF_COMPLIANT ;
+
exe add : add.cpp ;
exe add_va : add_va.cpp ;
Modified: sandbox/local/libs/local/example/add.cpp
==============================================================================
--- sandbox/local/libs/local/example/add.cpp (original)
+++ sandbox/local/libs/local/example/add.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -20,7 +20,7 @@
void BOOST_LOCAL_FUNCTION_PARAMS( (double num)
(const bind factor) (bind& sum) ) {
sum += factor * num;
- std::clog << "Summed: " << sum << std::endl;
+ std::cout << "Summed: " << sum << std::endl;
} BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0);
@@ -28,7 +28,7 @@
double* nums = new double[size];
BOOST_LOCAL_EXIT( (const bind& size) (bind nums) ) {
if (size && nums) delete[] nums;
- std::clog << "Freed array: " << nums << std::endl;
+ std::cout << "Freed array: " << nums << std::endl;
} BOOST_LOCAL_EXIT_END
nums[0] = 90.5; nums[1] = 7.0;
@@ -36,7 +36,7 @@
BOOST_LOCAL_BLOCK( (const bind& sum) ) {
assert(sum == 1975.0); // so far `sum` is 10*100+10*90.5+10*7=1975
- std::clog << "Asserted summation: " << sum << std::endl;
+ std::cout << "Asserted summation: " << sum << std::endl;
} BOOST_LOCAL_BLOCK_END
return 0;
Modified: sandbox/local/libs/local/example/add_block.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_block.cpp (original)
+++ sandbox/local/libs/local/example/add_block.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -14,7 +14,7 @@
BOOST_LOCAL_BLOCK( (const bind& sum) ) {
assert(sum == 1975.0); // OK: Complier error if `==` confused with `=`.
- std::clog << "Asserted summation: " << sum << std::endl;
+ std::cout << "Asserted summation: " << sum << std::endl;
return; // Return this local block (and not the enclosing scope).
assert(false); // OK: Never executed.
Modified: sandbox/local/libs/local/example/add_block_impl.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_block_impl.cpp (original)
+++ sandbox/local/libs/local/example/add_block_impl.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -18,7 +18,7 @@
// Local block body.
{
assert(sum == 1975.0); // OK: Complier error if `==` confused with `=`.
- std::clog << "Asserted summation: " << sum << std::endl;
+ std::cout << "Asserted summation: " << sum << std::endl;
return; // Return this local block (and not the enclosing scope).
assert(false); // OK: Never executed.
Modified: sandbox/local/libs/local/example/add_block_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_block_va.cpp (original)
+++ sandbox/local/libs/local/example/add_block_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_block_va_cpp
#include <boost/local/block.hpp>
#include <iostream>
@@ -14,7 +23,7 @@
BOOST_LOCAL_BLOCK(const bind& sum) {
assert(sum == 1975.0); // OK: Complier error if `==` confused with `=`.
- std::clog << "Asserted summation: " << sum << std::endl;
+ std::cout << "Asserted summation: " << sum << std::endl;
return; // Return this local block (and not the enclosing scope).
assert(false); // OK: Never executed.
@@ -24,3 +33,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_except_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_except_va.cpp (original)
+++ sandbox/local/libs/local/example/add_except_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[add_except_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -40,3 +49,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_exit.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_exit.cpp (original)
+++ sandbox/local/libs/local/example/add_exit.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -15,7 +15,7 @@
BOOST_LOCAL_EXIT( (const bind& size) (bind nums) ) {
if (size && nums) delete[] nums;
- std::clog << "Freed array: " << nums << std::endl;
+ std::cout << "Freed array: " << nums << std::endl;
return; // Return this local exit (and not the enclosing scope).
assert(false); // OK: Never executed.
Modified: sandbox/local/libs/local/example/add_exit_impl.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_exit_impl.cpp (original)
+++ sandbox/local/libs/local/example/add_exit_impl.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -19,7 +19,7 @@
// Local exit body.
{
if (size && nums) delete[] nums;
- std::clog << "Freed array: " << nums << std::endl;
+ std::cout << "Freed array: " << nums << std::endl;
return; // Return this local exit (and not the enclosing scope).
assert(false); // OK: Never executed.
Modified: sandbox/local/libs/local/example/add_exit_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_exit_va.cpp (original)
+++ sandbox/local/libs/local/example/add_exit_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_exit_va_cpp
#include <boost/local/exit.hpp>
#include <iostream>
@@ -15,7 +24,7 @@
BOOST_LOCAL_EXIT(const bind& size, bind nums) {
if (size && nums) delete[] nums;
- std::clog << "Freed array: " << nums << std::endl;
+ std::cout << "Freed array: " << nums << std::endl;
return; // Return this local exit (and not the enclosing scope).
assert(false); // OK: Never executed.
@@ -25,3 +34,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_function.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_function.cpp (original)
+++ sandbox/local/libs/local/example/add_function.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -15,7 +15,7 @@
void BOOST_LOCAL_FUNCTION_PARAMS( (double num) (const bind factor)
(bind& sum) ) {
sum += factor * num;
- std::clog << "Summed: " << sum << std::endl;
+ std::cout << "Summed: " << sum << std::endl;
} BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0);
Modified: sandbox/local/libs/local/example/add_function_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_function_va.cpp (original)
+++ sandbox/local/libs/local/example/add_function_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_function_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -15,7 +24,7 @@
void BOOST_LOCAL_FUNCTION_PARAMS(double num, const bind factor,
bind& sum) {
sum += factor * num;
- std::clog << "Summed: " << sum << std::endl;
+ std::cout << "Summed: " << sum << std::endl;
} BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0);
@@ -23,3 +32,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_optimizers_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_optimizers_va.cpp (original)
+++ sandbox/local/libs/local/example/add_optimizers_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[add_optimizers_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -19,3 +28,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_template_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_template_va.cpp (original)
+++ sandbox/local/libs/local/example/add_template_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[add_template_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -46,3 +55,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_this_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_this_va.cpp (original)
+++ sandbox/local/libs/local/example/add_this_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_this_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -53,3 +62,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_va.cpp (original)
+++ sandbox/local/libs/local/example/add_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -20,7 +29,7 @@
void BOOST_LOCAL_FUNCTION_PARAMS(double num,
const bind factor, bind& sum) {
sum += factor * num;
- std::clog << "Summed: " << sum << std::endl;
+ std::cout << "Summed: " << sum << std::endl;
} BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0);
@@ -28,7 +37,7 @@
double* nums = new double[size];
BOOST_LOCAL_EXIT(const bind& size, bind nums) {
if (size && nums) delete[] nums;
- std::clog << "Freed array: " << nums << std::endl;
+ std::cout << "Freed array: " << nums << std::endl;
} BOOST_LOCAL_EXIT_END
nums[0] = 90.5; nums[1] = 7.0;
@@ -36,10 +45,12 @@
BOOST_LOCAL_BLOCK(const bind& sum) {
assert(sum == 1975.0); // so far `sum` is 10*100+10*90.5+10*7=1975
- std::clog << "Asserted summation: " << sum << std::endl;
+ std::cout << "Asserted summation: " << sum << std::endl;
} BOOST_LOCAL_BLOCK_END
return 0;
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_x_y_default_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_x_y_default_va.cpp (original)
+++ sandbox/local/libs/local/example/add_x_y_default_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_x_y_default_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -18,3 +27,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_x_y_default_with_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_x_y_default_with_va.cpp (original)
+++ sandbox/local/libs/local/example/add_x_y_default_with_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_x_y_default_with_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -20,3 +29,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/add_x_y_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_x_y_va.cpp (original)
+++ sandbox/local/libs/local/example/add_x_y_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ add_x_y_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -18,3 +27,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/doit_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/doit_va.cpp (original)
+++ sandbox/local/libs/local/example/doit_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ doit_va_cpp
#include <boost/local/function.hpp>
#include <boost/function.hpp>
@@ -57,3 +66,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/factorial_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/factorial_va.cpp (original)
+++ sandbox/local/libs/local/example/factorial_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ factorial_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -44,3 +53,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/find_if_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/find_if_va.cpp (original)
+++ sandbox/local/libs/local/example/find_if_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[find_if_va_cpp
#include <boost/local/function.hpp>
#include <list>
@@ -42,3 +51,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/gcc_access_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/gcc_access_va.cpp (original)
+++ sandbox/local/libs/local/example/gcc_access_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[gcc_access_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -21,3 +30,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/gcc_square_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/gcc_square_va.cpp (original)
+++ sandbox/local/libs/local/example/gcc_square_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[gcc_square_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -17,3 +26,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/gcc_store_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/gcc_store_va.cpp (original)
+++ sandbox/local/libs/local/example/gcc_store_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[gcc_store_va_cpp
#include <boost/local/function.hpp>
@@ -20,3 +29,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/nesting_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/nesting_va.cpp (original)
+++ sandbox/local/libs/local/example/nesting_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,6 +1,12 @@
-// Local functions, blocks, and exits can be arbitrarily nested into each other.
-// Simplified syntax for variadic macros only.
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
//[nesting_va_cpp
#include <boost/local/function.hpp>
@@ -40,3 +46,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/params_all_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/params_all_va.cpp (original)
+++ sandbox/local/libs/local/example/params_all_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[params_all_va_cpp
#include <boost/local/function.hpp>
@@ -162,3 +171,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/print_map_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/print_map_va.cpp (original)
+++ sandbox/local/libs/local/example/print_map_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ print_map_va_cpp
#include <boost/local/function.hpp>
#include <boost/utility/identity.hpp>
@@ -42,3 +51,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/scope_guards_errno_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/scope_guards_errno_va.cpp (original)
+++ sandbox/local/libs/local/example/scope_guards_errno_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[scope_guards_errno_va_cpp
#include <boost/local/exit.hpp>
#include <iostream>
@@ -26,3 +35,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/scope_guards_except_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/scope_guards_except_va.cpp (original)
+++ sandbox/local/libs/local/example/scope_guards_except_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[scope_guards_except_va_cpp
#include <boost/local/exit.hpp>
#include <iostream>
@@ -34,3 +43,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/ten_ep.cpp
==============================================================================
--- sandbox/local/libs/local/example/ten_ep.cpp (original)
+++ sandbox/local/libs/local/example/ten_ep.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ten_ep_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -13,3 +22,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/ten_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/ten_va.cpp (original)
+++ sandbox/local/libs/local/example/ten_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -1,4 +1,13 @@
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[ten_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -13,3 +22,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/this_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/this_va.cpp (original)
+++ sandbox/local/libs/local/example/this_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[this_va_cpp
#include <boost/local/function.hpp>
#include <vector>
@@ -49,3 +58,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/transform_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/transform_va.cpp (original)
+++ sandbox/local/libs/local/example/transform_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[transform_va_cpp
#include <boost/local/function.hpp>
#include <iostream>
@@ -43,3 +52,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/typeof_tpl_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/typeof_tpl_va.cpp (original)
+++ sandbox/local/libs/local/example/typeof_tpl_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[typeof_tpl_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -59,3 +68,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/typeof_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/typeof_va.cpp (original)
+++ sandbox/local/libs/local/example/typeof_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[typeof_va_cpp
#include <boost/local/function.hpp>
#include <boost/local/block.hpp>
@@ -56,3 +65,5 @@
}
//]
+#endif
+
Modified: sandbox/local/libs/local/example/world_exit_va.cpp
==============================================================================
--- sandbox/local/libs/local/example/world_exit_va.cpp (original)
+++ sandbox/local/libs/local/example/world_exit_va.cpp 2011-03-24 21:36:29 EDT (Thu, 24 Mar 2011)
@@ -4,6 +4,15 @@
// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
// copy at http://www.boost.org/LICENSE_1_0.txt).
+#include <boost/config.hpp>
+#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#include <iostream>
+int main() {
+ std::cerr << "Error: This program requires variadic macros" << std::endl;
+ return 0;
+}
+#else
+
//[world_exit_va_cpp
#include <boost/local/exit.hpp>
#include <boost/foreach.hpp>
@@ -103,3 +112,5 @@
}
//]
+#endif
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk