|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74695 - in sandbox/local/libs/local/doc: html html/boost/local/function html/boost_local qbk
From: lorcaminiti_at_[hidden]
Date: 2011-10-04 11:00:06
Author: lcaminiti
Date: 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
New Revision: 74695
URL: http://svn.boost.org/trac/boost/changeset/74695
Log:
Upd docs (using C++03 and C++11 instead of ISO C++ and C++0x).
Text files modified:
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_OVERLOAD_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/overload.html | 22 +++---
sandbox/local/libs/local/doc/html/boost_local/Advanced_Topics.html | 146 +++++++++++++++++++++++----------------
sandbox/local/libs/local/doc/html/boost_local/Alternatives.html | 113 +++++++++++++++++-------------
sandbox/local/libs/local/doc/html/boost_local/Examples.html | 51 ++++++++-----
sandbox/local/libs/local/doc/html/boost_local/Getting_Started.html | 13 +-
sandbox/local/libs/local/doc/html/boost_local/Implementation.html | 12 +-
sandbox/local/libs/local/doc/html/boost_local/Tutorial.html | 117 ++++++++++++++++++-------------
sandbox/local/libs/local/doc/html/index.html | 56 ++++++++------
sandbox/local/libs/local/doc/qbk/advanced_topics.qbk | 22 +++---
sandbox/local/libs/local/doc/qbk/alternatives.qbk | 32 ++++----
sandbox/local/libs/local/doc/qbk/examples.qbk | 10 +-
sandbox/local/libs/local/doc/qbk/getting_started.qbk | 4
sandbox/local/libs/local/doc/qbk/implementation.qbk | 4
sandbox/local/libs/local/doc/qbk/introduction.qbk | 14 ++-
sandbox/local/libs/local/doc/qbk/local.qbk | 11 +-
sandbox/local/libs/local/doc/qbk/tutorial.qbk | 2
32 files changed, 372 insertions(+), 289 deletions(-)
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div>
<div class="refsect1">
-<a name="id926449"></a><h2>Description</h2>
+<a name="id926850"></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 <code class="computeroutput">std::map<int, double></code> contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
<p>On some compilers (like GCC), using this macro on abstract types (classes with one or more pure virtual functions) generate a compile-time error. This can be worked around by manipulating the type adding and removing a reference to it: </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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_IDENTITY_VALUE(parenthesized_value)</pre></div>
<div class="refsect1">
-<a name="id926763"></a><h2>Description</h2>
+<a name="id927164"></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 <code class="computeroutput">key_sizeof<int, double>::value</code> 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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK(bindings)</pre></div>
<div class="refsect1">
-<a name="id920522"></a><h2>Description</h2>
+<a name="id921058"></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 <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_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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK_END</pre></div>
<div class="refsect1">
-<a name="id921376"></a><h2>Description</h2>
+<a name="id921913"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_BLOCK_TPL(bindings)</pre></div>
<div class="refsect1">
-<a name="id921302"></a><h2>Description</h2>
+<a name="id921839"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_COMPLIANT</pre></div>
<div class="refsect1">
-<a name="id921549"></a><h2>Description</h2>
+<a name="id922085"></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 the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section, <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 s
equencing macro syntax is allowed (regardless of whether the compiler supports variadic and empty 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). Variadic macros, are supported by most recent compilers (like MSVC and GCC), they were first introduced by the C99 standard, they are part of the C++0x standard, but they are not part of the official ISO C++ standard. Empty macro parameters are also supported by the C99 standards and they are part of the C++0x standard, but they are not supported by all modern compilers (for example, they are not supported by MSVC).</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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</pre></div>
<div class="refsect1">
-<a name="id921754"></a><h2>Description</h2>
+<a name="id922291"></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 applies 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 sequence).</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_OVERLOAD_MAX.html
==============================================================================
--- sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html (original)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_OVERLOAD_MAX</pre></div>
<div class="refsect1">
-<a name="id921863"></a><h2>Description</h2>
+<a name="id922399"></a><h2>Description</h2>
<p>If programmers leave this configuration macro undefined, its default value is <code class="computeroutput">6</code>.</p>
<p>This number must be greater or equal than 2 (because at least two function types are needed to define an overloaded call operator) otherwise the library will generate a compile-time error.</p>
<p><span class="bold"><strong>Warning:</strong></span> Increasing this number will increase compilation time when the header file <code class="computeroutput">"boost/local/function/overload.hpp"</code> is included.</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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</pre></div>
<div class="refsect1">
-<a name="id921976"></a><h2>Description</h2>
+<a name="id922512"></a><h2>Description</h2>
<p>If programmers leave this configuration macro undefined, the default symbol used is <code class="computeroutput">this_</code> (this default symbol follows Boost's conventions to postfix with an underscore symbols that refer to C++ keywords -- the <code class="computeroutput">this</code> keyword in this case).</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/Tutorial.html" title="Tutorial">Tutorial</a> section, <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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT(binding_list)</pre></div>
<div class="refsect1">
-<a name="id922134"></a><h2>Description</h2>
+<a name="id922670"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT_END</pre></div>
<div class="refsect1">
-<a name="id922990"></a><h2>Description</h2>
+<a name="id923527"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_EXIT_TPL(binding_list)</pre></div>
<div class="refsect1">
-<a name="id922916"></a><h2>Description</h2>
+<a name="id923453"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_NAME(name)</pre></div>
<div class="refsect1">
-<a name="id924386"></a><h2>Description</h2>
+<a name="id924786"></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>The local function name can be prefixed by the "keyword" <code class="computeroutput">inline</code> (see the <a class="link" href="boost_local/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> section): </p>
<pre class="programlisting"> <span class="special">...</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="keyword">inline</span> <span class="identifier">name</span><span class="special">)</span>
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_PARAMS(parameters)</pre></div>
<div class="refsect1">
-<a name="id923157"></a><h2>Description</h2>
+<a name="id923694"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_FUNCTION_PARAMS_TPL(parameters)</pre></div>
<div class="refsect1">
-<a name="id924310"></a><h2>Description</h2>
+<a name="id924711"></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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,7 @@
</span>BOOST_LOCAL_TYPEOF(bound_variable_name)</pre></div>
<div class="refsect1">
-<a name="id926127"></a><h2>Description</h2>
+<a name="id926528"></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">t</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 t</code> then <code class="computeroutput">BOOST_LOCAL_TYPEOF(t)</code> is <code class="computeroutput">T</code>. </p></li>
Modified: sandbox/local/libs/local/doc/html/boost/local/function/overload.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost/local/function/overload.html (original)
+++ sandbox/local/libs/local/doc/html/boost/local/function/overload.html 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -35,37 +35,37 @@
<span class="keyword">class</span> <a class="link" href="overload.html" title="Class template overload">overload</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// <a class="link" href="overload.html#boost.local.function.overloadconstruct-copy-destruct">construct/copy/destruct</a></span>
- <a class="link" href="overload.html#id435338-bb"><span class="identifier">overload</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="special">...</span><span class="special">)</span><span class="special">;</span>
+ <a class="link" href="overload.html#id436005-bb"><span class="identifier">overload</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="special">...</span><span class="special">)</span><span class="special">;</span>
- <span class="comment">// <a class="link" href="overload.html#id435259-bb">public member functions</a></span>
- <span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <a class="link" href="overload.html#id435263-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <a class="link" href="overload.html#id435300-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="comment">// <a class="link" href="overload.html#id435926-bb">public member functions</a></span>
+ <span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <a class="link" href="overload.html#id435930-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <a class="link" href="overload.html#id435967-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
-<a name="id925425"></a><h2>Description</h2>
+<a name="id925825"></a><h2>Description</h2>
<p>This functor aggregates together calls to functions of all the specified function types <code class="computeroutput">F0</code>, <code class="computeroutput">F1</code>, etc. Each function type must be specified following the Boost.Function preferred syntax: </p>
<pre class="programlisting"> <span class="identifier">ResultType</span> <span class="special">(</span><span class="identifier">ArgumentType0</span><span class="special">,</span> <span class="identifier">ArgumgnetType1</span><span class="special">,</span> <span class="special">...</span><span class="special">)</span>
</pre>
<p>The maximum number of overloaded function types is specified by the <code class="computeroutput"><a class="link" href="../../../BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html" title="Macro BOOST_LOCAL_CONFIG_OVERLOAD_MAX">BOOST_LOCAL_CONFIG_OVERLOAD_MAX</a></code> configuration macro. The maximum number of function parameters for each of the specified function type is specified by the <code class="computeroutput"><a class="link" href="../../../BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html" title="Macro BOOST_LOCAL_CONFIG_OVERLOAD_MAX">BOOST_LOCAL_CONFIG_OVERLOAD_MAX</a></code> configuration macro.</p>
<p><span class="bold"><strong>See:</strong></span> <a class="link" href="../../../boost_local/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> section, <code class="computeroutput"><a class="link" href="../../../BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html" title="Macro BOOST_LOCAL_CONFIG_OVERLOAD_MAX">BOOST_LOCAL_CONFIG_OVERLOAD_MAX</a></code>, <code class="computeroutput"><a class="link" href="../../../BOOST_LOCAL_CONFIG_OVERLOAD_MAX.html" title="Macro BOOST_LOCAL_CONFIG_OVERLOAD_MAX">BOOST_LOCAL_CONFIG_OVERLOAD_MAX</a></code>, Boost.Function. </p>
<div class="refsect2">
-<a name="id925568"></a><h3>
+<a name="id925968"></a><h3>
<a name="boost.local.function.overloadconstruct-copy-destruct"></a><code class="computeroutput">overload</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
-<pre class="literallayout"><a name="id435338-bb"></a><span class="identifier">overload</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="special">...</span><span class="special">)</span><span class="special">;</span></pre>Construct the overloading functor. <p>Any functor that can be converted to a <code class="computeroutput">boost::function</code> funcotr can be specified (local functions, functio
n pointers, other functors, etc). </p>
+<pre class="literallayout"><a name="id436005-bb"></a><span class="identifier">overload</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> <span class="special">...</span><span class="special">)</span><span class="special">;</span></pre>Construct the overloading functor. <p>Any functor that can be converted to a <code class="computeroutput">boost::function</code> funcotr can be specified (local functions, functio
n pointers, other functors, etc). </p>
</li></ol></div>
</div>
<div class="refsect2">
-<a name="id925744"></a><h3>
-<a name="id435259-bb"></a><code class="computeroutput">overload</code> public member functions</h3>
+<a name="id926144"></a><h3>
+<a name="id435926-bb"></a><code class="computeroutput">overload</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
-<pre class="literallayout"><span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <a name="id435263-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Call operator matching the signature of the function type specified as first. <p>This will in turn invoke the call operator of the first functor that was passed to the constructor. </p>
+<pre class="literallayout"><span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span> <a name="id435930-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F0</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Call operator matching the signature of the function type specified as first. <p>This will in turn invoke the call operator of the first functor that was passed to the constructor. </p>
</li>
<li class="listitem">
-<pre class="literallayout"><span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <a name="id435300-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Call operator matching the signature of the function type specified as second. <p>This will in turn invoke the call operator of the second functor that was passed to the constructor. </p>
+<pre class="literallayout"><span class="identifier">result_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span> <a name="id435967-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">arg0_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="identifier">arg1_type</span><span class="special"><</span> <span class="identifier">F1</span> <span class="special">></span><span class="special">,</span> <span class="special">...</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Call operator matching the signature of the function type specified as second. <p>This will in turn invoke the call operator of the second functor that was passed to the constructor. </p>
</li>
</ol></div>
</div>
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -86,7 +86,7 @@
<p>
In addition, local function parameter types cannot start with non-alphanumeric
symbols (alphanumeric symbols are <code class="computeroutput"><span class="identifier">A</span><span class="special">-</span><span class="identifier">Z</span></code>, <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">z</span></code>,
- and <code class="computeroutput"><span class="number">0</span><span class="special">-</span><span class="number">9</span></code>). <sup>[<a name="id882451" href="#ftn.id882451" class="footnote">19</a>]</sup> The library will generate (cryptic) preprocessor errors if a
+ and <code class="computeroutput"><span class="number">0</span><span class="special">-</span><span class="number">9</span></code>). <sup>[<a name="id882590" href="#ftn.id882590" class="footnote">19</a>]</sup> The library will generate (cryptic) preprocessor errors if a
parameter type starts with a non-alphanumeric symbol.
</p>
<p>
@@ -100,7 +100,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -161,7 +162,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -225,7 +227,7 @@
<li class="listitem">
Parenthesis to wrap the type expression (and therefore any commas <code class="computeroutput"><span class="special">,</span></code> that it contains) passed as parameter
to the <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code>
- macro. <sup>[<a name="id883887" href="#ftn.id883887" class="footnote">20</a>]</sup>
+ macro. <sup>[<a name="id884041" href="#ftn.id884041" class="footnote">20</a>]</sup>
</li>
</ol></div>
<div class="note"><table border="0" summary="Note">
@@ -249,7 +251,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -304,7 +307,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -363,7 +367,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -420,7 +425,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -494,7 +500,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -627,7 +634,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -737,7 +745,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -884,7 +893,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1024,7 +1034,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1198,7 +1209,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1353,18 +1365,19 @@
<span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a></code><span class="special">(</span><span class="keyword">inline</span> <span class="emphasis"><em>name</em></span><span class="special">)</span>
</pre>
<p>
- On ISO C++ compliant compilers, inlined local functions always have a run-time
- comparable to their equivalent implementation that uses local functors (see
- the <a class="link" href="Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section).
- However, inlined local functions have the limitation that they cannot be
- assigned to other functors (like <code class="computeroutput">boost::function</code>)
- and they cannot be passed as template parameters. <sup>[<a name="id904499" href="#ftn.id904499" class="footnote">21</a>]</sup> On C++0x compilers, <code class="computeroutput"><span class="keyword">inline</span></code>
- has no effect because this library will automatically generate code that
- uses C++0x specific features to inline the local function calls whenever
- possible even if the local function is not declared inlined (unless the
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_CONFIG_COMPLIANT.html" title="Macro BOOST_LOCAL_CONFIG_COMPLIANT">BOOST_LOCAL_CONFIG_COMPLIANT</a></code>
- configuration macro is defined). Furthermore, non C++0x local functions can
- always be passes as template parameters even when they are declared inlined.
+ On C++03
+ compliant compilers, inlined local functions always have a run-time comparable
+ to their equivalent implementation that uses local functors (see the <a class="link" href="Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section). However,
+ inlined local functions have the limitation that they cannot be assigned
+ to other functors (like <code class="computeroutput">boost::function</code>)
+ and they cannot be passed as template parameters. <sup>[<a name="id904734" href="#ftn.id904734" class="footnote">21</a>]</sup> On C++11
+ compilers, <code class="computeroutput"><span class="keyword">inline</span></code> has no effect
+ because this library will automatically generate code that uses C++11
+ specific features to inline the local function calls whenever possible even
+ if the local function is not declared inlined (unless the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_CONFIG_COMPLIANT.html" title="Macro BOOST_LOCAL_CONFIG_COMPLIANT">BOOST_LOCAL_CONFIG_COMPLIANT</a></code>
+ configuration macro is defined). Furthermore, non C++11
+ local functions can always be passes as template parameters even when they
+ are declared inlined.
</p>
<div class="important"><table border="0" summary="Important">
<tr>
@@ -1373,8 +1386,9 @@
</tr>
<tr><td align="left" valign="top"><p>
It is recommended to not declare a local function inlined unless it is
- strictly necessary for optimizing pure ISO C++ compliant code (because
- in all other cases this library will automatically take advantage of C++0x
+ strictly necessary for optimizing pure C++03
+ compliant code (because in all other cases this library will automatically
+ take advantage of C++11
features to optimize the local function calls while always allowing to
pass the local function as a template parameter).
</p></td></tr>
@@ -1393,7 +1407,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1514,7 +1529,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1647,7 +1663,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1800,7 +1817,7 @@
functor can be constructed from any function type that can be converted to
a <code class="computeroutput">boost::function</code>
type (i.e., local functions but also function pointers and other function
- objects). <sup>[<a name="id913385" href="#ftn.id913385" class="footnote">22</a>]</sup> The <code class="computeroutput"><a class="link" href="../boost/local/function/overload.html" title="Class template overload">boost::local::function::overload</a></code>
+ objects). <sup>[<a name="id913840" href="#ftn.id913840" class="footnote">22</a>]</sup> The <code class="computeroutput"><a class="link" href="../boost/local/function/overload.html" title="Class template overload">boost::local::function::overload</a></code>
functor provides overloaded call operators <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code> that match the signatures of all the specified
function types.
</p>
@@ -1831,7 +1848,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1977,7 +1995,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -2078,9 +2097,9 @@
Classifiers (<code class="computeroutput"><span class="keyword">auto</span></code> and <code class="computeroutput"><span class="keyword">register</span></code>)</a>
</h3></div></div></div>
<p>
- Local function parameters support the storage classifiers as usual in ISO
- C++. The <code class="computeroutput"><span class="keyword">auto</span></code> storage classifier
- is specified as: <sup>[<a name="id917998" href="#ftn.id917998" class="footnote">23</a>]</sup>
+ Local function parameters support the storage classifiers as usual in C++03.
+ The <code class="computeroutput"><span class="keyword">auto</span></code> storage classifier
+ is specified as: <sup>[<a name="id918474" href="#ftn.id918474" class="footnote">23</a>]</sup>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="emphasis"><em>parameter-type parameter-name</em></span>
</pre>
@@ -2101,7 +2120,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -2219,7 +2239,8 @@
<td>
<p>
This is not supported because local functions are implemented using
- local classes and ISO C++ local classes cannot be templates.
+ local classes and C++03
+ local classes cannot be templates.
</p>
</td>
</tr>
@@ -2254,10 +2275,11 @@
<td>
<p>
Local functions can be specified <code class="computeroutput"><span class="keyword">inline</span></code>
- to improve the chances that ISO C++ standard compilers can optimize
- the local function call run-time (but <code class="computeroutput"><span class="keyword">inline</span></code>
- local functions cannot be passes as template parameters on ISO
- C++ standard compilers).
+ to improve the chances that C++03
+ standard compilers can optimize the local function call run-time
+ (but <code class="computeroutput"><span class="keyword">inline</span></code> local
+ functions cannot be passes as template parameters on C++03
+ standard compilers).
</p>
</td>
</tr>
@@ -2310,7 +2332,7 @@
<td>
<p>
This is not supported because local functions are not member functions.
- <sup>[<a name="id919249" href="#ftn.id919249" class="footnote">a</a>]</sup>
+ <sup>[<a name="id919784" href="#ftn.id919784" class="footnote">a</a>]</sup>
</p>
</td>
</tr>
@@ -2409,7 +2431,7 @@
</td>
</tr>
</tbody>
-<tbody class="footnotes"><tr><td colspan="3"><div class="footnote"><p><sup>[<a id="ftn.id919249" href="#id919249" class="para">a</a>] </sup>
+<tbody class="footnotes"><tr><td colspan="3"><div class="footnote"><p><sup>[<a id="ftn.id919784" href="#id919784" class="para">a</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> It would be possible
to make a local function class inherit from another local function
class. However, this "inheritance" feature is not implemented
@@ -2425,7 +2447,7 @@
</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="id919596" href="#ftn.id919596" class="footnote">24</a>]</sup>
+ will generate a compile-time error. <sup>[<a name="id920131" href="#ftn.id920131" class="footnote">24</a>]</sup>
</p>
<p>
For example, the following code will <span class="bold"><strong>not</strong></span>
@@ -2477,21 +2499,21 @@
</div>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id882451" href="#id882451" class="para">19</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id882590" href="#id882590" class="para">19</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This limitation derives from
the fact that <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code>
uses preprocessor token concatenation to inspect the parameter type token
to see if the token is a parameter or a bound variable. The C++ preprocessor
does not allow to concatenate non-alphanumeric tokens.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id883887" href="#id883887" class="para">20</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id884041" href="#id884041" class="para">20</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> Using variadic macros,
this extra set of parenthesis could be eliminated requiring only the
parenthesis to invoke the <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code>
macro. However, this feature is currently not implemented and the double
parenthesis are always needed when invoking this macro.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id904499" href="#id904499" class="para">21</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id904734" href="#id904734" class="para">21</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This library uses an indirect
function call via a function pointer in order to pass the local function
as a template parameter (see the <a class="link" href="Implementation.html" title="Appendix: Implementation">Implementation</a>
@@ -2500,12 +2522,14 @@
local functions do not use such indirect function pointer call (so they
are more likely to be optimized) but because of that they cannot be passed
as template parameters. The indirect function pointer call is needed on
- ISO C++ but it is not needed on C++0x (see [N2657])
+ C++03
+ but it is not needed on C++11
+ (see [N2657])
thus this library automatically generates local function calls that can
- be inlined on C++0x compilers (even when the local function is not declared
- inlined).
+ be inlined on C++11
+ compilers (even when the local function is not declared inlined).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id913385" href="#id913385" class="para">22</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id913840" href="#id913840" class="para">22</a>] </sup>
The <code class="computeroutput"><a class="link" href="../boost/local/function/overload.html" title="Class template overload">boost::local::function::overload</a></code>
functor can aggregate any functor and it is not at all specific to local
functions. Therefore, it might be preferable to move <code class="computeroutput"><a class="link" href="../boost/local/function/overload.html" title="Class template overload">boost::local::function::overload</a></code>
@@ -2513,15 +2537,17 @@
to Boost.Function
and to rename it as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">::</span><span class="identifier">overload</span></code>.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id917998" href="#id917998" class="para">23</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id918474" href="#id918474" class="para">23</a>] </sup>
The <code class="computeroutput"><span class="keyword">auto</span></code> storage classifier
- is part of the ISO C++ standard and therefore supported by this library.
- However, the meaning and usage of the <code class="computeroutput"><span class="keyword">auto</span></code>
- keyword changed in C++0x. Therefore, use the <code class="computeroutput"><span class="keyword">auto</span></code>
- storage classifier with the usual care in order to avoid writing ISO C++
- code that might not work on C++0x.
+ is part of the C++03
+ standard and therefore supported by this library. However, the meaning
+ and usage of the <code class="computeroutput"><span class="keyword">auto</span></code> keyword
+ changed in C++11.
+ Therefore, use the <code class="computeroutput"><span class="keyword">auto</span></code> storage
+ classifier with the usual care in order to avoid writing C++03
+ code that might not work on C++11.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id919596" href="#id919596" class="para">24</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id920131" href="#id920131" class="para">24</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) and operators cannot be used as local variable
Modified: sandbox/local/libs/local/doc/html/boost_local/Alternatives.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Alternatives.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Alternatives.html 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -33,7 +33,8 @@
</dl></div>
<p>
This section compares the features offered by this library with similar features
- offered by other libraries and by the new C++0x standard.
+ offered by other libraries and by the new C++11
+ standard.
</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
@@ -75,8 +76,8 @@
</th>
<th>
<p>
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
- Lambda</a> (not ISO C++)
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
+ Lambda</a> (not C++03)
</p>
</th>
<th>
@@ -217,8 +218,9 @@
</td>
<td>
<p>
- Yes. The ISO C++ standard does not allow to pass local types as
- template parameters (see [N2657])
+ Yes. The C++03
+ standard does not allow to pass local types as template parameters
+ (see [N2657])
but this library implements a "trick" to get around this
limitation (see the <a class="link" href="Implementation.html" title="Appendix: Implementation">Implementation</a>
section).
@@ -226,8 +228,9 @@
</td>
<td>
<p>
- No on ISO C++ compilers (but yes on C++0x compilers and some compilers
- like MSVC 8.0, see [N2657]).
+ No on C++03
+ compilers (but yes on C++11
+ compilers and some compilers like MSVC 8.0, see [N2657]).
</p>
</td>
<td>
@@ -324,7 +327,8 @@
</td>
<td>
<p>
- No (C++0x lambdas cannot be function templates).
+ No (C++11
+ lambdas cannot be function templates).
</p>
</td>
<td>
@@ -340,35 +344,35 @@
</tr>
</tbody>
</table></div>
-<a name="boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__0x_lambda__ulink__functions"></a><h6>
-<a name="boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__0x_lambda__ulink__functions-heading"></a>
- <a class="link" href="Alternatives.html#boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__0x_lambda__ulink__functions">Comparison
- with <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+<a name="boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__11_lambda__ulink__functions"></a><h6>
+<a name="boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__11_lambda__ulink__functions-heading"></a>
+ <a class="link" href="Alternatives.html#boost_local.Alternatives.local_functions.comparison_with__ulink_url__http___en_wikipedia_org_wiki_c_2b_2b0x_lambda_functions_and_expressions__c__11_lambda__ulink__functions">Comparison
+ with <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
Lambda</a> Functions</a>
</h6>
<p>
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
lambda</a> functions have most of the features that Boost.Local
local functions have, key pro and cons of the two approaches are:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
lambda</a> functions can be defined within expressions while Boost.Local
local functions can only be defined within declarations.
</li>
<li class="listitem">
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
- lambda</a> functions are only supported by the C++0x standard so
- they are not supported by all C++ compilers. Boost.Local
- local functions use only ISO C++ compliant features so they are supported
- on all C++ compliant compilers.
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
+ lambda</a> functions are only supported by the C++11
+ standard so they are not supported by all C++ compilers. Boost.Local
+ local functions use only C++03
+ compliant features so they are supported on all C++ compliant compilers.
</li>
<li class="listitem">
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
lambda</a> do not allow to bind variables in scope by constant reference
or by non-constant value. Because a variable cannot be bound by constant
- reference, <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ reference, <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
lambda</a> functions can bind a variable by constant only if the
variable is copyable and the binding requires a (potentially expensive)
extra copy operation. Both constant reference and non-constant value
@@ -387,14 +391,15 @@
<thead><tr>
<th>
<p>
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
Lambda</a>
</p>
</th>
<th>
<p>
<a href="http://www.boost.org/doc/libs/release/libs/local/doc/html/index.html" target="_top">Boost.Local</a>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -500,14 +505,15 @@
<thead><tr>
<th>
<p>
- <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
Lambda</a>
</p>
</th>
<th>
<p>
<a href="http://www.boost.org/doc/libs/release/libs/local/doc/html/index.html" target="_top">Boost.Local</a>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -625,7 +631,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -790,8 +797,9 @@
<p>
</p>
<p>
- Or using <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
- lambda</a> functions (but not part of the ISO C++ standard):
+ Or using <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
+ lambda</a> functions (but not part of the C++03
+ standard):
</p>
<p>
@@ -907,13 +915,14 @@
</p>
<p>
Overall, this library has compile-times and generates binary sizes similar
- to the ones of the other approaches. This library run-times on ISO C++ compliant
- compilers (see "Boost.Local
+ to the ones of the other approaches. This library run-times on C++03
+ compliant compilers (see "Boost.Local
Compliant" below) were measured to be larger than other approaches when
compiler optimization is enabled (using <code class="computeroutput"><span class="identifier">bjam</span>
<span class="identifier">release</span> <span class="special">...</span></code>).
However, on compilers that allow to pass local types as template parameters
- (e.g., MSVC 8.0 or GCC 4.5.1 with C++0x features enabled, see also [N2657])
+ (e.g., MSVC 8.0 or GCC 4.5.1 with C++11
+ features enabled, see also [N2657])
this library automatically generates optimized code that runs as fast as
the fastest of the other approaches (see "Boost.Local"
below). When this library local function is specified <code class="computeroutput"><span class="keyword">inline</span></code>
@@ -935,9 +944,10 @@
</tr>
<tr><td align="left" valign="top"><p>
The run-time performances of this library local functions are explained
- because on ISO C++ compliant compilers (e.g., GCC 4.3.4) this library needs
- to use a function pointer in order to pass the local function class as
- a template parameter (see [N2657]
+ because on C++03
+ compliant compilers (e.g., GCC 4.3.4) this library needs to use a function
+ pointer in order to pass the local function class as a template parameter
+ (see [N2657]
and the <a class="link" href="Implementation.html" title="Appendix: Implementation">Implementation</a>
section). For all tested compilers, this function pointer prevents the
compiler optimization algorithms from inlining the local function calls.
@@ -946,18 +956,20 @@
have been observed to allow all tested compilers to inline all the function
calls for optimization. This run-time performance cost is not present on
compilers that allow to pass local types as template parameters (e.g.,
- MSVC 8.0 or GCC 4.5.1 with C++0x features enabled) because this library
- does not have to use the extra function pointer to implement the local
- function call (it directly passes the local class type as template parameter).
+ MSVC 8.0 or GCC 4.5.1 with C++11
+ features enabled) because this library does not have to use the extra function
+ pointer to implement the local function call (it directly passes the local
+ class type as template parameter).
</p></td></tr>
</table></div>
<p>
- This run-time performance cost on ISO C++ compliant compilers might or might
- not be an issue depending on the performance requirements of specific applications.
- For example, an application might already be using a number of indirect function
- calls (function pointers, virtual functions, etc) for which the overhead
- added by using the one extra function pointer required by the local function
- call might not be noticeable within the overall program run-time.
+ This run-time performance cost on C++03
+ compliant compilers might or might not be an issue depending on the performance
+ requirements of specific applications. For example, an application might
+ already be using a number of indirect function calls (function pointers,
+ virtual functions, etc) for which the overhead added by using the one extra
+ function pointer required by the local function call might not be noticeable
+ within the overall program run-time.
</p>
<p>
Finally, note that only a very simple local function body with just a single
@@ -1019,9 +1031,9 @@
<colgroup><col></colgroup>
<thead><tr><th>
<p>
- GCC 4.5.1 With C++0x Lambdas and "Local Types as Template
- Parameters" (<code class="literal">bjam cxxflags=-std=c++0x ...</code>)
- on Ubuntu Linux 10
+ GCC 4.5.1 With C++11
+ Lambdas and "Local Types as Template Parameters" (<code class="literal">bjam
+ cxxflags=-std=c++0x ...</code>) on Ubuntu Linux 10
</p>
</th></tr></thead>
<tbody>
@@ -1046,7 +1058,8 @@
<thead><tr><th>
<p>
MSVC 8.0 With "Local Types as Template Parameters" (Without
- C++0x Lambdas) on Windows XP
+ C++11
+ Lambdas) on Windows XP
</p>
</th></tr></thead>
<tbody>
@@ -1069,8 +1082,10 @@
<colgroup><col></colgroup>
<thead><tr><th>
<p>
- GCC 4.3.4 With ISO C++ Only (Without C++0x Lambdas and Without
- "Local Types as Template Parameters) on Cygwin
+ GCC 4.3.4 With C++03
+ Only (Without C++11
+ Lambdas and Without "Local Types as Template Parameters) on
+ Cygwin
</p>
</th></tr></thead>
<tbody>
Modified: sandbox/local/libs/local/doc/html/boost_local/Examples.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Examples.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Examples.html 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -31,10 +31,11 @@
for User Defined Types</a></span></dt>
<dt><span class="section"><a href="Examples.html#boost_local.Examples.Emulating_Ds_Scope_Guards">Emulating
D's Scope Guards</a></span></dt>
-<dt><span class="section"><a href="Examples.html#boost_local.Examples.stl_find__c__0x_lambdas_">STL Find
- (C++0x Lambdas)</a></span></dt>
-<dt><span class="section"><a href="Examples.html#boost_local.Examples.binding__this___c__0x_lambdas_">Binding
- <code class="computeroutput"><span class="keyword">this</span></code> (C++0x Lambdas)</a></span></dt>
+<dt><span class="section"><a href="Examples.html#boost_local.Examples.stl_find____cpp11___lambdas_">STL
+ Find (C++11 Lambdas)</a></span></dt>
+<dt><span class="section"><a href="Examples.html#boost_local.Examples.binding__this_____cpp11___lambdas_">Binding
+ <code class="computeroutput"><span class="keyword">this</span></code> (C++11
+ Lambdas)</a></span></dt>
<dt><span class="section"><a href="Examples.html#boost_local.Examples.gcc_nested_functions">GCC Nested
Functions</a></span></dt>
<dt><span class="section"><a href="Examples.html#boost_local.Examples.all_parameter_permutations">All
@@ -63,7 +64,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -307,7 +309,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -394,7 +397,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -489,13 +493,13 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_local.Examples.stl_find__c__0x_lambdas_"></a><a class="link" href="Examples.html#boost_local.Examples.stl_find__c__0x_lambdas_" title="STL Find (C++0x Lambdas)">STL Find
- (C++0x Lambdas)</a>
+<a name="boost_local.Examples.stl_find____cpp11___lambdas_"></a><a class="link" href="Examples.html#boost_local.Examples.stl_find____cpp11___lambdas_" title="STL Find (C++11 Lambdas)">STL
+ Find (C++11 Lambdas)</a>
</h3></div></div></div>
<p>
This example is adapted from [N2550]
- (C++0x lambda functions). This example passes a local function to the STL
- algorithm <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span></code>.
+ (C++11 lambda
+ functions). This example passes a local function to the STL algorithm <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span></code>.
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -505,7 +509,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -606,12 +611,15 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="boost_local.Examples.binding__this___c__0x_lambdas_"></a><a class="link" href="Examples.html#boost_local.Examples.binding__this___c__0x_lambdas_" title="Binding this (C++0x Lambdas)">Binding
- <code class="computeroutput"><span class="keyword">this</span></code> (C++0x Lambdas)</a>
+<a name="boost_local.Examples.binding__this_____cpp11___lambdas_"></a><a class="link" href="Examples.html#boost_local.Examples.binding__this_____cpp11___lambdas_" title="Binding this (C++11 Lambdas)">Binding
+ <code class="computeroutput"><span class="keyword">this</span></code> (C++11
+ Lambdas)</a>
</h3></div></div></div>
<p>
This example is adapted from [N2529]
- (C++0x lambda functions). This example binds the object in scope <code class="computeroutput"><span class="keyword">this</span></code> to a local function.
+ (C++11 lambda
+ functions). This example binds the object in scope <code class="computeroutput"><span class="keyword">this</span></code>
+ to a local function.
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -621,7 +629,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -743,7 +752,9 @@
The GCC compiler supports local functions under the name of <a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html" target="_top">nested
functions</a>. Nested functions are exclusively a C extension of the
GCC compiler, they are not supported for C++ not even by the GCC compiler,
- and they are not part of any C or C++ standard (ISO C++, C99, C++0x, etc)
+ and they are not part of any C or C++ standard (C++03,
+ C99,
+ C++11, etc)
nor they are supported by other compilers like MSVC.
</p>
<p>
@@ -758,7 +769,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -946,7 +958,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
Modified: sandbox/local/libs/local/doc/html/boost_local/Getting_Started.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Getting_Started.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Getting_Started.html 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -70,13 +70,14 @@
templates with partial specializations and function pointers (similarly to
<a href="http://www.boost.org/doc/libs/release/doc/html/function.html" target="_top">Boost.Function</a>).
As a consequence, this library is fairly demanding on compilers' compliance
- with the ISO C++ standard. At present, this library has been successfully
- compiled and tested on the following compilers and platforms:
+ with the C++03
+ standard. At present, this library has been successfully compiled and tested
+ on the following compilers and platforms:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
- GNU Compiler Collection (GCC) 4.5.1 (with and without C++0x features
- enabled) on Ubuntu Linux 10.
+ GNU Compiler Collection (GCC) 4.5.1 (with and without C++11
+ features enabled) on Ubuntu Linux 10.
</li>
<li class="listitem">
GCC 4.3.4 on Cygwin.
@@ -123,7 +124,7 @@
</pre>
<p>
The followings are part of the library private API, they are not documented,
- and they should not be directly used by programmers: <sup>[<a name="id866215" href="#ftn.id866215" class="footnote">2</a>]</sup>
+ and they should not be directly used by programmers: <sup>[<a name="id866234" href="#ftn.id866234" class="footnote">2</a>]</sup>
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
@@ -161,7 +162,7 @@
</div>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id866215" href="#id866215" class="para">2</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id866234" href="#id866234" class="para">2</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This library concatenates symbols
specified by the programmers (e.g., the local function name) with other
symbols (e.g., special prefixes or preprocessor line numbers) to make internal
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -51,10 +51,11 @@
</h3></div></div></div>
<p>
This library uses a local class to implement the local function object. However,
- in ISO C++ a local class (and therefore the local function object that it
- implements) cannot be passed as template parameter (e.g., to the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
- algorithm), this is instead possible on C++0x, MSVC, and some other compilers
- (see [N2657]).
+ in C++03
+ a local class (and therefore the local function object that it implements)
+ cannot be passed as template parameter (e.g., to the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
+ algorithm), this is instead possible on C++11,
+ MSVC, and some other compilers (see [N2657]).
To work around this limitation, this library investigated the following two
"tricks" (both tricks can be extended to support eventual function
default parameters):
@@ -153,7 +154,8 @@
call (via either a function pointer or a virtual function respectively) that
has been observed to be resolved only at run-time by all analyzed compilers.
Therefore, on compilers that accept local types as template parameters (MSVC,
- C++0x, etc, see [N2657]),
+ C++11, etc,
+ see [N2657]),
this library generates code that passes the local class type directly as
template parameter without using neither one of these two tricks in order
to take full advantage of compiler optimizations that inline the local function
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -46,7 +46,7 @@
<p>
Local functions are defined using the following macros (see the Reference
section) from within a declarative context (this is a limitation with respect
- to <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ to <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
lambda</a> functions which can instead be declared within expressions):
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -82,7 +82,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -115,12 +116,12 @@
<span class="special">...</span> <span class="special">}</span></code>
using the usual C++ syntax. The body is specified outside any of the macros
so eventual compiler error messages and related line numbers retain their
- usual meaning and format. <sup>[<a name="id866916" href="#ftn.id866916" class="footnote">3</a>]</sup>
+ usual meaning and format. <sup>[<a name="id866948" href="#ftn.id866948" class="footnote">3</a>]</sup>
</p>
<p>
The macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a></code>
is used to end the local function definition and to specify the local function
- name. <sup>[<a name="id866952" href="#ftn.id866952" class="footnote">4</a>]</sup>
+ name. <sup>[<a name="id866984" href="#ftn.id866984" class="footnote">4</a>]</sup>
</p>
<p>
For example, let's program a local function named <code class="computeroutput"><span class="identifier">add</span></code>
@@ -137,7 +138,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -211,11 +213,12 @@
<span class="special">}</span>
</pre>
<p>
- The ISO C++ standard does not allow pass empty parameters to a macro so the
- macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code>
+ The C++03
+ standard does not allow pass empty parameters to a macro so the macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a></code>
cannot be invoked with an empty set of parenthesis <code class="computeroutput"><span class="special">()</span></code>
unless programmers use compiler extensions that support empty macro parameters
- (e.g., C99 and other modern compilers). However, C++ also allows to specify
+ (e.g., C99
+ standard and most modern compilers). However, C++ also allows to specify
an empty parameter list using the keyword <code class="computeroutput"><span class="keyword">void</span></code>:
</p>
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">ten</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span>
@@ -241,12 +244,14 @@
<thead><tr>
<th>
<p>
- Empty Macro Syntax (C99 and other modern compilers)
+ Empty Macro Syntax (C99
+ and other modern compilers)
</p>
</th>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -287,12 +292,14 @@
<thead><tr>
<th>
<p>
- Empty Macro Syntax (C99 and other modern compilers)
+ Empty Macro Syntax (C99
+ and other modern compilers)
</p>
</th>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -376,7 +383,7 @@
This library also allows to specify default values for the local function
parameters. However, the usual C++ syntax for default parameters that uses
the assignment symbol <code class="computeroutput"><span class="special">=</span></code> cannot
- be used. <sup>[<a name="id869064" href="#ftn.id869064" class="footnote">5</a>]</sup> The keyword <code class="computeroutput"><span class="keyword">default</span></code>
+ be used. <sup>[<a name="id869144" href="#ftn.id869144" class="footnote">5</a>]</sup> The keyword <code class="computeroutput"><span class="keyword">default</span></code>
is used instead:
</p>
<div class="informaltable"><table class="table">
@@ -387,7 +394,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -425,7 +433,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -478,7 +487,7 @@
<p>
Programmers can define a <code class="computeroutput"><span class="identifier">WITH_DEFAULT</span></code>
macro similar to the following if they think it improves readability over
- the syntax above: <sup>[<a name="id870041" href="#ftn.id870041" class="footnote">6</a>]</sup>
+ the syntax above: <sup>[<a name="id870135" href="#ftn.id870135" class="footnote">6</a>]</sup>
</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -488,7 +497,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -552,7 +562,7 @@
variables, the object <code class="computeroutput"><span class="keyword">this</span></code>,
etc) can be bound to a local function declaration. The types of bound variables
are automatically deduced by this library using Boost.Typeof.
- <sup>[<a name="id870842" href="#ftn.id870842" class="footnote">7</a>]</sup>
+ <sup>[<a name="id870944" href="#ftn.id870944" class="footnote">7</a>]</sup>
</p>
<div class="important"><table border="0" summary="Important">
<tr>
@@ -569,7 +579,7 @@
</table></div>
<p>
This library introduces the new "keyword" <code class="computeroutput"><span class="identifier">bind</span></code>
- <sup>[<a name="id870924" href="#ftn.id870924" class="footnote">8</a>]</sup> which is used in place of the parameter type to specify the name
+ <sup>[<a name="id871026" href="#ftn.id871026" class="footnote">8</a>]</sup> which is used in place of the parameter type to specify the name
of a variable in scope to bind. The variable can be bound by value:
</p>
<pre class="programlisting"><span class="identifier">bind</span> <span class="emphasis"><em>variable-name</em></span> <span class="comment">// Bind by value.</span>
@@ -594,7 +604,7 @@
<p>
Note that when <code class="computeroutput"><span class="keyword">const</span></code> is used,
it must always precede <code class="computeroutput"><span class="identifier">bind</span></code>.
- <sup>[<a name="id871152" href="#ftn.id871152" class="footnote">9</a>]</sup>
+ <sup>[<a name="id871253" href="#ftn.id871253" class="footnote">9</a>]</sup>
</p>
<p>
If a variable is bound by value, then a copy of the variable value is taken
@@ -620,8 +630,8 @@
scope then it will not be bound as constant unless constant binding is
forced using <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">bind</span>
<span class="special">...</span></code>. (Note that binding by constant
- reference is not supported by <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
- lambda</a> functions but it is supported by this library.) <sup>[<a name="id871339" href="#ftn.id871339" class="footnote">10</a>]</sup>
+ reference is not supported by <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
+ lambda</a> functions but it is supported by this library.) <sup>[<a name="id871440" href="#ftn.id871440" class="footnote">10</a>]</sup>
</li>
<li class="listitem">
If a bound variable was declared as a reference in the enclosing scope,
@@ -629,7 +639,7 @@
using <code class="computeroutput"><span class="identifier">bind</span><span class="special">&</span>
<span class="special">...</span></code> or <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">bind</span><span class="special">&</span>
- <span class="special">...</span></code>. <sup>[<a name="id871462" href="#ftn.id871462" class="footnote">11</a>]</sup>
+ <span class="special">...</span></code>. <sup>[<a name="id871559" href="#ftn.id871559" class="footnote">11</a>]</sup>
</li>
</ul></div>
<p>
@@ -653,7 +663,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -723,7 +734,7 @@
when it is in scope (e.g., from an enclosing member function). This is done
by using <code class="computeroutput"><span class="keyword">this</span></code> as the name of
the variable to bind in the local function declaration and by using the special
- symbol <code class="computeroutput"><span class="identifier">this_</span></code> <sup>[<a name="id872632" href="#ftn.id872632" class="footnote">12</a>]</sup> (instead of <code class="computeroutput"><span class="keyword">this</span></code>)
+ symbol <code class="computeroutput"><span class="identifier">this_</span></code> <sup>[<a name="id872736" href="#ftn.id872736" class="footnote">12</a>]</sup> (instead of <code class="computeroutput"><span class="keyword">this</span></code>)
to access the object within the local function body.
</p>
<p>
@@ -766,12 +777,12 @@
<p>
When the object <code class="computeroutput"><span class="keyword">this</span></code> is bound
to a local function, the local function body must use the special symbol
- <code class="computeroutput"><span class="identifier">this_</span></code> (instead of <code class="computeroutput"><span class="keyword">this</span></code>) to access the bound object. <sup>[<a name="id872961" href="#ftn.id872961" class="footnote">13</a>]</sup>
+ <code class="computeroutput"><span class="identifier">this_</span></code> (instead of <code class="computeroutput"><span class="keyword">this</span></code>) to access the bound object. <sup>[<a name="id873066" href="#ftn.id873066" class="footnote">13</a>]</sup>
</p>
<p>
Unfortunately, mistakenly using <code class="computeroutput"><span class="keyword">this</span></code>
within the local function body instead of <code class="computeroutput"><span class="identifier">this_</span></code>
- will not necessarily generate a compile-time error. <sup>[<a name="id873062" href="#ftn.id873062" class="footnote">14</a>]</sup> Programmers are responsible to make sure that <code class="computeroutput"><span class="keyword">this</span></code> is never used within a local function
+ will not necessarily generate a compile-time error. <sup>[<a name="id873167" href="#ftn.id873167" class="footnote">14</a>]</sup> Programmers are responsible to make sure that <code class="computeroutput"><span class="keyword">this</span></code> is never used within a local function
body which should only use the special symbol <code class="computeroutput"><span class="identifier">this_</span></code>.
</p>
</td></tr>
@@ -790,7 +801,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -958,7 +970,7 @@
<tr><td align="left" valign="top"><p>
A <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
instruction from within a local block jumps to the end of the local block
- body and it does not return the enclosing function. <sup>[<a name="id876475" href="#ftn.id876475" class="footnote">15</a>]</sup>
+ body and it does not return the enclosing function. <sup>[<a name="id876588" href="#ftn.id876588" class="footnote">15</a>]</sup>
</p></td></tr>
</table></div>
<p>
@@ -973,7 +985,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1070,7 +1083,7 @@
</tr>
<tr><td align="left" valign="top"><p>
The execution of the local exit body code is guaranteed only if the program
- does not terminate because of an uncaught exception. <sup>[<a name="id877714" href="#ftn.id877714" class="footnote">16</a>]</sup>
+ does not terminate because of an uncaught exception. <sup>[<a name="id877834" href="#ftn.id877834" class="footnote">16</a>]</sup>
</p></td></tr>
</table></div>
<p>
@@ -1107,7 +1120,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1175,7 +1189,7 @@
Local exits are very similar to the <span class="emphasis"><em>scope exits</em></span> provided
by Boost.ScopeExit
with the addition that they also support constant binding and binding of
- the object <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id878995" href="#ftn.id878995" class="footnote">17</a>]</sup> Local exits can be used to emulate the <a href="http://d.digitalmars.com" target="_top">D
+ the object <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id879124" href="#ftn.id879124" class="footnote">17</a>]</sup> Local exits can be used to emulate the <a href="http://d.digitalmars.com" target="_top">D
Programming Language</a> <span class="emphasis"><em>scope guards</em></span> (see the
<a class="link" href="Examples.html#boost_local.Examples.Emulating_Ds_Scope_Guards" title="Emulating D's Scope Guards">Emulating
D's Scope Guards</a> example).
@@ -1189,7 +1203,7 @@
When local functions, local blocks, and local exits are programmed within
templates, they need to be declared using the following special macros ending
with the <code class="computeroutput"><span class="identifier">TPL</span></code> postfix (see
- the Reference section): <sup>[<a name="id879307" href="#ftn.id879307" class="footnote">18</a>]</sup>
+ the Reference section): <sup>[<a name="id879438" href="#ftn.id879438" class="footnote">18</a>]</sup>
</p>
<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_PARAMS_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL">BOOST_LOCAL_FUNCTION_PARAMS_TPL</a></code><span class="special">(</span><span class="emphasis"><em>parameters</em></span><span class="special">)</span>
<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a></code><span class="special">(</span><span class="emphasis"><em>bindings</em></span><span class="special">)</span>
@@ -1213,7 +1227,8 @@
<thead><tr>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -1324,20 +1339,20 @@
</div>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id866916" href="#id866916" class="para">3</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id866948" href="#id866948" class="para">3</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> If the local function body
were instead passed as a macro parameter, it would be expanded on a single
line of code (because macros always expand as a single line of code). Therefore,
eventual compiler error line numbers would all report the same value and
would no longer be useful to pinpoint the error.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id866952" href="#id866952" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id866984" href="#id866984" class="para">4</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> The local function name must
be passed to the macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a></code>
ending the function definition so this macro can declare a local variable
with the local function name to hold the local function object.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id869064" href="#id869064" class="para">5</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id869144" href="#id869144" class="para">5</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> The assignment symbol <code class="computeroutput"><span class="special">=</span></code> cannot be used to specify default parameter
values because default values are not part of the parameter type so they
cannot be handled using template metaprogamming. Default parameter values
@@ -1350,12 +1365,12 @@
symbol cannot be detected by preprocessor metaprogramming because it cannot
be concatenated by the preprocessor).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id870041" href="#id870041" class="para">6</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id870135" href="#id870135" class="para">6</a>] </sup>
The authors do not personally find the use of the <code class="computeroutput"><span class="identifier">WITH_DEFAULT</span></code>
macro more readable and they prefer to use the <code class="computeroutput"><span class="keyword">default</span></code>
"keyword" directly.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id870842" href="#id870842" class="para">7</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id870944" href="#id870944" class="para">7</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> By binding a variable in scope,
the local function declaration is specifying that such a variable should
be accessible within the local function body regardless of its type. Semantically,
@@ -1368,7 +1383,7 @@
For example, this is useful for maintenance because if a bound variable
type is changed, the local function declaration does not have to change.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id870924" href="#id870924" class="para">8</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id871026" href="#id871026" class="para">8</a>] </sup>
Obviously, the token <code class="computeroutput"><span class="identifier">bind</span></code>
is not a keyword of the C++ language. This library parses the token <code class="computeroutput"><span class="identifier">bind</span></code> during macro expansion using preprocessor
metaprogramming (see the <a class="link" href="Implementation.html" title="Appendix: Implementation">Implementation</a>
@@ -1377,7 +1392,7 @@
level within the syntax defined by the macros of this library -- thus it
is referred to as a "keyword" only within quotes.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id871152" href="#id871152" class="para">9</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id871253" href="#id871253" class="para">9</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> The library macros could have
been implemented to accept both syntaxes <code class="computeroutput"><span class="keyword">const</span>
<span class="identifier">bind</span> <span class="special">...</span></code>
@@ -1388,7 +1403,7 @@
<span class="identifier">bind</span> <span class="special">...</span></code>)
is supported.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id871339" href="#id871339" class="para">10</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id871440" href="#id871440" class="para">10</a>] </sup>
An historical note: Constant binding of variables in scope was the
main use case that originally motivated the authors in developing this
library. The authors needed to locally create a chuck of code to assert
@@ -1403,7 +1418,7 @@
correctly generates an error because the bound variable is of <code class="computeroutput"><span class="keyword">const</span></code> type within the local function
body.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id871462" href="#id871462" class="para">11</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id871559" href="#id871559" class="para">11</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> Variables originally declared
as references are bound by value unless <code class="computeroutput"><span class="special">[</span><span class="keyword">const</span><span class="special">]</span> <span class="identifier">bind</span><span class="special">&</span></code>
is used so that references can be bound by both value <code class="computeroutput"><span class="special">[</span><span class="keyword">const</span><span class="special">]</span> <span class="identifier">bind</span></code>
@@ -1416,13 +1431,13 @@
even if <code class="computeroutput"><span class="identifier">bind</span><span class="special">[&]</span></code>
is used instead of <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">[&]</span></code>.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id872632" href="#id872632" class="para">12</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id872736" href="#id872736" class="para">12</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> The special name <code class="computeroutput"><span class="identifier">this_</span></code> was chosen following <a href="http://boost.2283326.n4.nabble.com/local-this-or-this-td3423912.html" target="_top">Boost
practises</a> which postfix with an underscore identifiers that are
named after keywords (the C++ keyword <code class="computeroutput"><span class="keyword">this</span></code>
in this case).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id872961" href="#id872961" class="para">13</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id873066" href="#id873066" class="para">13</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This limitation comes from
the fact that <code class="computeroutput"><span class="keyword">this</span></code> is a
reserved C++ keyword so it cannot be used as the name of the internal
@@ -1436,7 +1451,7 @@
behaviour of <code class="computeroutput"><span class="keyword">static_cast</span></code></a>
(which might not work on all platforms at the cost of portability).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id873062" href="#id873062" class="para">14</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id873167" href="#id873167" class="para">14</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> The local function body cannot
be a static member function of the local functor object in order to support
recursion (because the local function name is specified 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>
@@ -1449,7 +1464,7 @@
Therefore, from within the local function body the variable <code class="computeroutput"><span class="keyword">this</span></code> is visible but it refers to the local
functor and not to the bound object.
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id876475" href="#id876475" class="para">15</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id876588" href="#id876588" class="para">15</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> Programmers might expect
<code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
to exit the enclosing function instead of the local block (or local exit),
@@ -1467,7 +1482,7 @@
<code class="computeroutput"><span class="identifier">BOOST_LOCAL_RETURN</span><span class="special">;</span></code>)
to exit local blocks (and local exits).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id877714" href="#id877714" class="para">16</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id877834" href="#id877834" class="para">16</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This library (as well as
<a href="http://www.boost.org/doc/libs/release/libs/scope_exit/doc/html/index.html" target="_top">Boost.ScopeExit</a>)
uses the destructor of a local variable to automatically execute the
@@ -1478,7 +1493,7 @@
scope exit code even if the main program terminates because of an uncaught
exception.)
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id878995" href="#id878995" class="para">17</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id879124" href="#id879124" class="para">17</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> This library could be merged
together with Boost.ScopeExit
into a new library named Boost.Scope (from the meaning of the word "scope"
@@ -1507,7 +1522,7 @@
name of "<a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html" target="_top">nested
functions</a>" (GCC compiler extension).
</p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id879307" href="#id879307" class="para">18</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id879438" href="#id879438" class="para">18</a>] </sup>
<span class="bold"><strong>Rationale.</strong></span> Within templates, this library
needs to use <code class="computeroutput"><span class="keyword">typename</span></code> to explicitly
indicate that some expressions evaluate to a type. Because C++ does not
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-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -27,7 +27,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright © 2009-2011 Lorenzo Caminiti</p></div>
<div><div class="legalnotice">
-<a name="id808134"></a><p>
+<a name="id808762"></a><p>
Use, modification, and distribution is subject to the Boost Software License,
Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
</p>
@@ -66,10 +66,7 @@
of many programming languages, notably Pascal
and Ada,
yet lacking from C++ (see also [N2511]).
- This library supports the following features for local functions (see the
- <a class="link" href="boost_local/Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section for a
- comparison between this library and the features offered by other C++ libraries
- and constructs):
+ This library supports the following features for local functions:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
@@ -110,6 +107,13 @@
in scope including the object <code class="computeroutput"><span class="keyword">this</span></code>).
</li>
</ul></div>
+<p>
+ See the <a class="link" href="boost_local/Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section
+ for a comparison between this library, <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
+ lambda</a> functions, Boost.Lambda,
+ Boost.Phoenix,
+ and other C++ libraries offering similar features.
+ </p>
<a name="boost_local.Introduction.two_syntaxes"></a><h6>
<a name="boost_local.Introduction.two_syntaxes-heading"></a>
<a class="link" href="index.html#boost_local.Introduction.two_syntaxes">Two Syntaxes</a>
@@ -121,18 +125,18 @@
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
The <span class="emphasis"><em>sequencing macro syntax</em></span> is fully compliant with
- the ISO C++ standard and supported on all C++ compilers. This syntax requires
- to wrap the local function parameters and bound variables between round
- parenthesis <code class="computeroutput"><span class="special">()</span></code>.
+ the C++03
+ standard and supported on all C++ compilers. This syntax requires to wrap
+ the local function parameters and bound variables between round parenthesis
+ <code class="computeroutput"><span class="special">()</span></code>.
</li>
<li class="listitem">
The <span class="emphasis"><em>variadic macro synstax</em></span> is available only on C++
compilers that support <a href="http://en.wikipedia.org/wiki/Variadic_macro" target="_top">variadic
- macros</a> (variadic macros were first introduced by the C99 standard
- and they are now supported by essentially all modern C++ compilers including
- GCC and MSVC). This syntax allows to use commas <code class="computeroutput"><span class="special">,</span></code>
- to separate macro parameters therefore resembling the usual C++ syntax
- for function parameter declaration.
+ macros</a> (variadic macros were first introduced by the C99
+ standard and they are now supported by essentially all modern C++ compilers
+ including GCC and MSVC). This syntax allows to use commas <code class="computeroutput"><span class="special">,</span></code> to separate macro parameters therefore
+ resembling the usual C++ syntax for function parameter declaration.
</li>
</ul></div>
<p>
@@ -167,12 +171,13 @@
<thead><tr>
<th>
<p>
- Notes
+ #
</p>
</th>
<th>
<p>
- Variadic Macro Syntax (C99 and later compilers)
+ Variadic Macro Syntax (C99
+ and later compilers)
</p>
</th>
<th>
@@ -317,7 +322,7 @@
</tr></tbody>
</table></div>
<p>
- Notes:
+ Comments (see respective line number "#" of above example):
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
@@ -331,12 +336,13 @@
round parenthesis <code class="literal">(<span class="emphasis"><em>parameter-type parameter-name</em></span>)<span class="emphasis"><em>...</em></span></code>
(default parameter values can also be specified using a special syntax,
see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section).
- On C99 and later preprocessors which support variadic macros, the same
- parameter macro also allows to specify the parameters separated by commas
- instead than wrapped within parenthesis <code class="literal"><span class="emphasis"><em>parameter-type
- parameter-name</em></span>,<span class="emphasis"><em>...</em></span></code> thus supporting
- a syntax similar to the usual C++ syntax for function parameter lists.
- The local function result type is specified just before the parameter macro.
+ On C99
+ and later preprocessors which support variadic macros, the same parameter
+ macro also allows to specify the parameters separated by commas instead
+ than wrapped within parenthesis <code class="literal"><span class="emphasis"><em>parameter-type parameter-name</em></span>,<span class="emphasis"><em>...</em></span></code>
+ thus supporting a syntax similar to the usual C++ syntax for function parameter
+ lists. The local function result type is specified just before the parameter
+ macro.
</li>
<li class="listitem">
The library macros introduce the special "keyword" <code class="computeroutput"><span class="identifier">bind</span></code> which can be used instead of the
@@ -344,7 +350,7 @@
by reference, by constant value, and by constant reference. In addition,
the object <code class="computeroutput"><span class="keyword">this</span></code> can be bound
(eventually by constant value but never by reference or constant reference
- <sup>[<a name="id865454" href="#ftn.id865454" class="footnote">1</a>]</sup> ) from within a non-static member function (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
+ <sup>[<a name="id865452" href="#ftn.id865452" class="footnote">1</a>]</sup> ) from within a non-static member function (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
section). For example, the variable <code class="computeroutput"><span class="identifier">factor</span></code>
is bound by constant value so it cannot be mistakenly modified by the local
function body. The variable <code class="computeroutput"><span class="identifier">sum</span></code>
@@ -420,13 +426,13 @@
</div>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id865454" href="#id865454" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id865452" href="#id865452" class="para">1</a>] </sup>
C++ does not allow to obtain a reference to the pointer <code class="computeroutput"><span class="keyword">this</span></code>.
</p></div>
</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: September 28, 2011 at 18:17:11 GMT</small></p></td>
+<td align="left"><p><small>Last revised: October 04, 2011 at 14:48:00 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/local/libs/local/doc/qbk/advanced_topics.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/advanced_topics.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/advanced_topics.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -285,20 +285,20 @@
...
} __BOOST_LOCAL_FUNCTION_NAME__(inline ``/name/``)
-On ISO C++ compliant compilers, inlined local functions always have a run-time comparable to their equivalent implementation that uses local functors (see the __Alternatives__ section).
+On __CPP03__ compliant compilers, inlined local functions always have a run-time comparable to their equivalent implementation that uses local functors (see the __Alternatives__ section).
However, inlined local functions have the limitation that they cannot be assigned to other functors (like `__boost__function__`) and they cannot be passed as template parameters.
[footnote
*Rationale.*
This library uses an indirect function call via a function pointer in order to pass the local function as a template parameter (see the __Implementation__ section).
No compiler has yet been observed to be able to inline function calls when they use such indirect function pointer calls.
Therefore, inlined local functions do not use such indirect function pointer call (so they are more likely to be optimized) but because of that they cannot be passed as template parameters.
-The indirect function pointer call is needed on ISO C++ but it is not needed on C++0x (see __N2657__) thus this library automatically generates local function calls that can be inlined on C++0x compilers (even when the local function is not declared inlined).
+The indirect function pointer call is needed on __CPP03__ but it is not needed on __CPP11__ (see __N2657__) thus this library automatically generates local function calls that can be inlined on __CPP11__ compilers (even when the local function is not declared inlined).
]
-On C++0x compilers, `inline` has no effect because this library will automatically generate code that uses C++0x specific features to inline the local function calls whenever possible even if the local function is not declared inlined (unless the `__BOOST_LOCAL_CONFIG_COMPLIANT__` configuration macro is defined).
-Furthermore, non C++0x local functions can always be passes as template parameters even when they are declared inlined.
+On __CPP11__ compilers, `inline` has no effect because this library will automatically generate code that uses __CPP11__ specific features to inline the local function calls whenever possible even if the local function is not declared inlined (unless the `__BOOST_LOCAL_CONFIG_COMPLIANT__` configuration macro is defined).
+Furthermore, non __CPP11__ local functions can always be passes as template parameters even when they are declared inlined.
[important
-It is recommended to not declare a local function inlined unless it is strictly necessary for optimizing pure ISO C++ compliant code (because in all other cases this library will automatically take advantage of C++0x features to optimize the local function calls while always allowing to pass the local function as a template parameter).
+It is recommended to not declare a local function inlined unless it is strictly necessary for optimizing pure __CPP03__ compliant code (because in all other cases this library will automatically take advantage of __CPP11__ features to optimize the local function calls while always allowing to pass the local function as a template parameter).
]
For example, the following local function is declared inlined (thus a for-loop needs to be used for portability instead of passing the local function as a template parameter to the `std::for_each` algorithm):
@@ -414,12 +414,12 @@
[section Storage Classifiers (`auto` and `register`)]
-Local function parameters support the storage classifiers as usual in ISO C++.
+Local function parameters support the storage classifiers as usual in __CPP03__.
The `auto` storage classifier is specified as:
[footnote
-The `auto` storage classifier is part of the ISO C++ standard and therefore supported by this library.
-However, the meaning and usage of the `auto` keyword changed in C++0x.
-Therefore, use the `auto` storage classifier with the usual care in order to avoid writing ISO C++ code that might not work on C++0x.
+The `auto` storage classifier is part of the __CPP03__ standard and therefore supported by this library.
+However, the meaning and usage of the `auto` keyword changed in __CPP11__.
+Therefore, use the `auto` storage classifier with the usual care in order to avoid writing __CPP03__ code that might not work on __CPP11__.
]
auto ``/parameter-type parameter-name/``
@@ -455,7 +455,7 @@
[
[ `template<`/template-parameter-list/`>` ]
[ No ]
- [ This is not supported because local functions are implemented using local classes and ISO C++ local classes cannot be templates. ]
+ [ This is not supported because local functions are implemented using local classes and __CPP03__ local classes cannot be templates. ]
]
[
[ `explicit` ]
@@ -465,7 +465,7 @@
[
[ `inline` ]
[ Yes ]
- [ Local functions can be specified `inline` to improve the chances that ISO C++ standard compilers can optimize the local function call run-time (but `inline` local functions cannot be passes as template parameters on ISO C++ standard compilers). ]
+ [ Local functions can be specified `inline` to improve the chances that __CPP03__ standard compilers can optimize the local function call run-time (but `inline` local functions cannot be passes as template parameters on __CPP03__ standard compilers). ]
]
[
[ `extern` ]
Modified: sandbox/local/libs/local/doc/qbk/alternatives.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/alternatives.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/alternatives.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -6,7 +6,7 @@
[section:Alternatives Appendix: Alternatives]
-This section compares the features offered by this library with similar features offered by other libraries and by the new C++0x standard.
+This section compares the features offered by this library with similar features offered by other libraries and by the new __CPP11__ standard.
[section Local Functions]
@@ -18,7 +18,7 @@
[ Boost.Local (this library) ]
[ Local Functor ]
[ Global Functor (not local) ]
- [ __CPP0x_Lambda__ (not ISO C++) ]
+ [ __CPP0x_Lambda__ (not __CPP03__) ]
[ __Boost_Lambda__ ]
[ __Boost_Phoenix__ ]
]
@@ -57,8 +57,8 @@
[
[ ['Can be passed as template parameter (e.g., to STL algorithms)] ]
[ Yes.
-The ISO C++ standard does not allow to pass local types as template parameters (see __N2657__) but this library implements a "trick" to get around this limitation (see the __Implementation__ section). ]
- [ No on ISO C++ compilers (but yes on C++0x compilers and some compilers like MSVC 8.0, see __N2657__). ]
+The __CPP03__ standard does not allow to pass local types as template parameters (see __N2657__) but this library implements a "trick" to get around this limitation (see the __Implementation__ section). ]
+ [ No on __CPP03__ compilers (but yes on __CPP11__ compilers and some compilers like MSVC 8.0, see __N2657__). ]
[ Yes. ]
[ Yes. ]
[ Yes. ]
@@ -83,7 +83,7 @@
[ No (local functions cannot be function templates). ]
[ No (local classes cannot have member function templates). ]
[ Yes. ]
- [ No (C++0x lambdas cannot be function templates). ]
+ [ No (__CPP11__ lambdas cannot be function templates). ]
[ Yes. ]
[ Yes. ]
]
@@ -94,8 +94,8 @@
__CPP0x_lambda__ functions have most of the features that __Boost_Local__ local functions have, key pro and cons of the two approaches are:
* __CPP0x_lambda__ functions can be defined within expressions while __Boost_Local__ local functions can only be defined within declarations.
-* __CPP0x_lambda__ functions are only supported by the C++0x standard so they are not supported by all C++ compilers.
-__Boost_Local__ local functions use only ISO C++ compliant features so they are supported on all C++ compliant compilers.
+* __CPP0x_lambda__ functions are only supported by the __CPP11__ standard so they are not supported by all C++ compilers.
+__Boost_Local__ local functions use only __CPP03__ compliant features so they are supported on all C++ compliant compilers.
* __CPP0x_lambda__ do not allow to bind variables in scope by constant reference or by non-constant value.
Because a variable cannot be bound by constant reference, __CPP0x_lambda__ functions can bind a variable by constant only if the variable is copyable and the binding requires a (potentially expensive) extra copy operation.
Both constant reference and non-constant value binding are instead supported by __Boost_Local__.
@@ -132,7 +132,7 @@
[add_using_global_functor_cpp]
-Or using __CPP0x_lambda__ functions (but not part of the ISO C++ standard):
+Or using __CPP0x_lambda__ functions (but not part of the __CPP03__ standard):
[add_using_cpp0x_lambda_cpp]
@@ -149,19 +149,19 @@
The following tables compare run-time, binary size, and compile-time for the different alternatives presented for local functions.
Overall, this library has compile-times and generates binary sizes similar to the ones of the other approaches.
-This library run-times on ISO C++ compliant compilers (see "__Boost_Local__ Compliant" below) were measured to be larger than other approaches when compiler optimization is enabled (using `bjam release ...`).
-However, on compilers that allow to pass local types as template parameters (e.g., MSVC 8.0 or GCC 4.5.1 with C++0x features enabled, see also __N2657__) this library automatically generates optimized code that runs as fast as the fastest of the other approaches (see "__Boost_Local__" below).
+This library run-times on __CPP03__ compliant compilers (see "__Boost_Local__ Compliant" below) were measured to be larger than other approaches when compiler optimization is enabled (using `bjam release ...`).
+However, on compilers that allow to pass local types as template parameters (e.g., MSVC 8.0 or GCC 4.5.1 with __CPP11__ features enabled, see also __N2657__) this library automatically generates optimized code that runs as fast as the fastest of the other approaches (see "__Boost_Local__" below).
When this library local function is specified `inline` (see "__Boost_Local__ Inline For-Loop" below and the __Advanced_Topics__ section) its run-times are always comparable to both the "Local Functor" and "Global Functor" approaches (but in this case the local function cannot be portably passed as template parameter, see __N2657__, so `std::for_each` is replaced by a for-loop).
Finally, this library run-times are always among the fastest when no compiler optimization is enabled (using `bjam debug ...`).
[note
-The run-time performances of this library local functions are explained because on ISO C++ compliant compilers (e.g., GCC 4.3.4) this library needs to use a function pointer in order to pass the local function class as a template parameter (see __N2657__ and the __Implementation__ section).
+The run-time performances of this library local functions are explained because on __CPP03__ compliant compilers (e.g., GCC 4.3.4) this library needs to use a function pointer in order to pass the local function class as a template parameter (see __N2657__ and the __Implementation__ section).
For all tested compilers, this function pointer prevents the compiler optimization algorithms from inlining the local function calls.
Instead, the functors used by other approaches like "__Boost_Lambda__" and "__Boost_Phoenix__" have been observed to allow all tested compilers to inline all the function calls for optimization.
-This run-time performance cost is not present on compilers that allow to pass local types as template parameters (e.g., MSVC 8.0 or GCC 4.5.1 with C++0x features enabled) because this library does not have to use the extra function pointer to implement the local function call (it directly passes the local class type as template parameter).
+This run-time performance cost is not present on compilers that allow to pass local types as template parameters (e.g., MSVC 8.0 or GCC 4.5.1 with __CPP11__ features enabled) because this library does not have to use the extra function pointer to implement the local function call (it directly passes the local class type as template parameter).
]
-This run-time performance cost on ISO C++ compliant compilers might or might not be an issue depending on the performance requirements of specific applications.
+This run-time performance cost on __CPP03__ compliant compilers might or might not be an issue depending on the performance requirements of specific applications.
For example, an application might already be using a number of indirect function calls (function pointers, virtual functions, etc) for which the overhead added by using the one extra function pointer required by the local function call might not be noticeable within the overall program run-time.
Finally, note that only a very simple local function body with just a single instruction was used for the anaylsis presented here (see the `profile_...` source files linked below).
@@ -192,7 +192,7 @@
[table
[ [
-GCC 4.5.1 With C++0x Lambdas and "Local Types as Template Parameters" ([^bjam cxxflags=-std=c++0x ...]) on Ubuntu Linux 10
+GCC 4.5.1 With __CPP11__ Lambdas and "Local Types as Template Parameters" ([^bjam cxxflags=-std=c++0x ...]) on Ubuntu Linux 10
] ]
[ [
[*Compiled with =bjam release ...= for maximum optimization (=-O3 -finline-functions=)]
@@ -206,7 +206,7 @@
[table
[ [
-MSVC 8.0 With "Local Types as Template Parameters" (Without C++0x Lambdas) on Windows XP
+MSVC 8.0 With "Local Types as Template Parameters" (Without __CPP11__ Lambdas) on Windows XP
] ]
[ [
[*Compiled with =bjam release ...= for maximum optimization (=/O2 /Ob2=)]
@@ -220,7 +220,7 @@
[table
[ [
-GCC 4.3.4 With ISO C++ Only (Without C++0x Lambdas and Without "Local Types as Template Parameters) on Cygwin
+GCC 4.3.4 With __CPP03__ Only (Without __CPP11__ Lambdas and Without "Local Types as Template Parameters) on Cygwin
] ]
[ [
[*Compiled with =bjam release ...= for maximum optimization (=-O3 -finline-functions=)]
Modified: sandbox/local/libs/local/doc/qbk/examples.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/examples.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/examples.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -40,9 +40,9 @@
[endsect]
-[section STL Find (C++0x Lambdas)]
+[section STL Find (__CPP11__ Lambdas)]
-This example is adapted from __N2550__ (C++0x lambda functions).
+This example is adapted from __N2550__ (__CPP11__ lambda functions).
This example passes a local function to the STL algorithm `std::find_if`.
[table
@@ -52,9 +52,9 @@
[endsect]
-[section Binding `this` (C++0x Lambdas)]
+[section Binding `this` (__CPP11__ Lambdas)]
-This example is adapted from __N2529__ (C++0x lambda functions).
+This example is adapted from __N2529__ (__CPP11__ lambda functions).
This example binds the object in scope `this` to a local function.
[table
@@ -67,7 +67,7 @@
[section GCC Nested Functions]
The GCC compiler supports local functions under the name of [@http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html nested functions].
-Nested functions are exclusively a C extension of the GCC compiler, they are not supported for C++ not even by the GCC compiler, and they are not part of any C or C++ standard (ISO C++, C99, C++0x, etc) nor they are supported by other compilers like MSVC.
+Nested functions are exclusively a C extension of the GCC compiler, they are not supported for C++ not even by the GCC compiler, and they are not part of any C or C++ standard (__CPP03__, __C99__, __CPP11__, etc) nor they are supported by other compilers like MSVC.
The following examples implement the examples from the GCC nested function documentation using this library local functions.
Modified: sandbox/local/libs/local/doc/qbk/getting_started.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/getting_started.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/getting_started.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -22,10 +22,10 @@
[section Compilers and Platforms]
The implementation of this library uses preprocessor and template metaprogramming (as supported by __Boost_Preprocessor__ and __Boost_MPL__), templates with partial specializations and function pointers (similarly to __Boost_Function__).
-As a consequence, this library is fairly demanding on compilers' compliance with the ISO C++ standard.
+As a consequence, this library is fairly demanding on compilers' compliance with the __CPP03__ standard.
At present, this library has been successfully compiled and tested on the following compilers and platforms:
-# GNU Compiler Collection (GCC) 4.5.1 (with and without C++0x features enabled) on Ubuntu Linux 10.
+# GNU Compiler Collection (GCC) 4.5.1 (with and without __CPP11__ features enabled) on Ubuntu Linux 10.
# GCC 4.3.4 on Cygwin.
# Miscrosoft Visual Studio Compiler (MSVC) 8.0 on Windows XP.
Modified: sandbox/local/libs/local/doc/qbk/implementation.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/implementation.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/implementation.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -14,7 +14,7 @@
[section Local Classes as Template Parameters]
This library uses a local class to implement the local function object.
-However, in ISO C++ a local class (and therefore the local function object that it implements) cannot be passed as template parameter (e.g., to the `std::for_each` algorithm), this is instead possible on C++0x, MSVC, and some other compilers (see __N2657__).
+However, in __CPP03__ a local class (and therefore the local function object that it implements) cannot be passed as template parameter (e.g., to the `std::for_each` algorithm), this is instead possible on __CPP11__, MSVC, and some other compilers (see __N2657__).
To work around this limitation, this library investigated the following two "tricks" (both tricks can be extended to support eventual function default parameters):
# The /casting functor trick/ uses a non-local functor that calls a static member function of the local class via a function pointer.
@@ -27,7 +27,7 @@
The casting functor trick measured slightly better run-time performances than the virtual functor trick so the current implementation of this library uses the casting functor trick (probably because in addition to the indirect function call, the virtual functor trick also requires accessing the [@http://en.wikipedia.org/wiki/Virtual_method_table virtual function table]).
However, both tricks do not allow for compiler optimizations that inline the local function calls because they rely on one indirect function call (via either a function pointer or a virtual function respectively) that has been observed to be resolved only at run-time by all analyzed compilers.
-Therefore, on compilers that accept local types as template parameters (MSVC, C++0x, etc, see __N2657__), this library generates code that passes the local class type directly as template parameter without using neither one of these two tricks in order to take full advantage of compiler optimizations that inline the local function calls.
+Therefore, on compilers that accept local types as template parameters (MSVC, __CPP11__, etc, see __N2657__), this library generates code that passes the local class type directly as template parameter without using neither one of these two tricks in order to take full advantage of compiler optimizations that inline the local function calls.
[endsect]
Modified: sandbox/local/libs/local/doc/qbk/introduction.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/introduction.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/introduction.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -9,7 +9,7 @@
/Local functions/ are a form of /information hiding/ and are useful for dividing procedural tasks into subtasks which are only meaningful locally, avoiding cluttering other parts of the program with functions, variables, etc unrelated to those parts.
Local functions therefore complement other structuring possibilities such as namespaces and classes.
Local functions are a feature of many programming languages, notably [@http://en.wikipedia.org/wiki/Nested_function#An_example Pascal] and [@http://en.wikipedia.org/wiki/Nesting_(computing)#In_programming Ada], yet lacking from C++ (see also __N2511__).
-This library supports the following features for local functions (see the __Alternatives__ section for a comparison between this library and the features offered by other C++ libraries and constructs):
+This library supports the following features for local functions:
* Local functions can access, or better [@http://en.wikipedia.org/wiki/Name_binding /bind/], any of the variables from the enclosing scope.
Furthermore, local functions defined within a member function can bind the enclosing object `this`.
@@ -23,14 +23,16 @@
Local blocks allow programmers to bind variables as constants (/constant binding/) to prevent local chunks of code from modifying selected variables.
* /Local exits/ which define blocks of code that are executed when the enclosing scope is exited (again with support for binding variables in scope including the object `this`).
+See the __Alternatives__ section for a comparison between this library, __CPP0x_lambda__ functions, __Boost_Lambda__, __Boost_Phoenix__, and other C++ libraries offering similar features.
+
[h5 Two Syntaxes]
This library uses macros to declare the local functions, local blocks, and local exits.
These macros support two different syntaxes:
-* The /sequencing macro syntax/ is fully compliant with the ISO C++ standard and supported on all C++ compilers.
+* The /sequencing macro syntax/ is fully compliant with the __CPP03__ standard and supported on all C++ compilers.
This syntax requires to wrap the local function parameters and bound variables between round parenthesis `()`.
-* The /variadic macro synstax/ is available only on C++ compilers that support [@http://en.wikipedia.org/wiki/Variadic_macro variadic macros] (variadic macros were first introduced by the C99 standard and they are now supported by essentially all modern C++ compilers including GCC and MSVC).
+* The /variadic macro synstax/ is available only on C++ compilers that support [@http://en.wikipedia.org/wiki/Variadic_macro variadic macros] (variadic macros were first introduced by the __C99__ standard and they are now supported by essentially all modern C++ compilers including GCC and MSVC).
This syntax allows to use commas `,` to separate macro parameters therefore resembling the usual C++ syntax for function parameter declaration.
The same library macros accept both syntaxes on compilers that support variadic macros and only the sequencing macro syntax on compilers that do not support variadic macros.
@@ -45,15 +47,15 @@
See the __Tutorial__ section for more details.
[table
-[ [Notes] [__Variadic_Macro_Syntax__] [__Sequencing_Macro_Syntax__] ]
+[ [#] [__Variadic_Macro_Syntax__] [__Sequencing_Macro_Syntax__] ]
[ [ [add_function_block_exit_callouts_cpp] ] [ [add_function_block_exit_va_cpp] ] [ [add_function_block_exit_cpp] ] ]
]
-Notes:
+Comments (see respective line number "#" of above example):
# Include the header files for this library local functions, local blocks, and local exits.
# The *local function* parameter macro takes a __Boost_Preprocessor__ sequence of tokens listing each parameter type and name wrapped within round parenthesis [^(['parameter-type parameter-name])['...]] (default parameter values can also be specified using a special syntax, see the __Tutorial__ section).
-On C99 and later preprocessors which support variadic macros, the same parameter macro also allows to specify the parameters separated by commas instead than wrapped within parenthesis [^['parameter-type parameter-name],['...]] thus supporting a syntax similar to the usual C++ syntax for function parameter lists.
+On __C99__ and later preprocessors which support variadic macros, the same parameter macro also allows to specify the parameters separated by commas instead than wrapped within parenthesis [^['parameter-type parameter-name],['...]] thus supporting a syntax similar to the usual C++ syntax for function parameter lists.
The local function result type is specified just before the parameter macro.
# The library macros introduce the special "keyword" `bind` which can be used instead of the parameter type to bind variables in scope.
Variables can be bound by value, by reference, by constant value, and by constant reference.
Modified: sandbox/local/libs/local/doc/qbk/local.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/local.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/local.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -19,6 +19,9 @@
]
]
+[def __CPP03__ [@http://www.open-std.org/JTC1/SC22/WG21/docs/standards C++03]]
+[def __CPP11__ [@http://www.open-std.org/JTC1/SC22/WG21/ C++11]]
+[def __C99__ [@http://www.open-std.org/jtc1/sc22/wg14/www/projects#9899 C99]]
[def __Boost__ [@http://www.boost.org/ Boost]]
[def __Boost_Local__ [@http://www.boost.org/doc/libs/release/libs/local/doc/html/index.html Boost.Local]]
[def __Boost_ScopeExit__ [@http://www.boost.org/doc/libs/release/libs/scope_exit/doc/html/index.html Boost.ScopeExit]]
@@ -33,8 +36,8 @@
[def __boost__function__ [@http://www.boost.org/doc/libs/release/doc/html/function.html boost::function]]
[def __Boost_TypeTraits__ [@http://www.boost.org/doc/libs/release/libs/type_traits/doc/html/index.html Boost.TypeTraits]]
[def __Boost_Chrono__ [@http://www.boost.org/doc/libs/release/libs/chrono/doc/html/index.html Boost.Chrono]]
-[def __CPP0x_lambda__ [@http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions C++0x lambda]]
-[def __CPP0x_Lambda__ [@http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions C++0x Lambda]]
+[def __CPP0x_lambda__ [@http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions C++11 lambda]]
+[def __CPP0x_Lambda__ [@http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions C++11 Lambda]]
[def __LISP__ [@http://en.wikipedia.org/wiki/Lisp_(programming_language) LISP]]
[def __Contractpp__ [@http://sourceforge.net/projects/contractpp Contract++]]
[def __D_Programming_Language__ [@http://d.digitalmars.com D Programming Language]]
@@ -79,9 +82,9 @@
[def __BOOST_IDENTITY_VALUE__ [macroref BOOST_IDENTITY_VALUE]]
[def __boost__local__function__overload__ [classref boost::local::function::overload]]
-[def __Variadic_Macro_Syntax__ Variadic Macro Syntax (C99 and later compilers)]
+[def __Variadic_Macro_Syntax__ Variadic Macro Syntax (__C99__ and later compilers)]
[def __Sequencing_Macro_Syntax__ Sequencing Macro Syntax (all C++ compilers)]
-[def __Empty_Macro_Syntax__ Empty Macro Syntax (C99 and other modern compilers)]
+[def __Empty_Macro_Syntax__ Empty Macro Syntax (__C99__ and other modern compilers)]
[import ../../example/add_function_block_exit_callouts.cpp]
[import ../../example/add_function_block_exit.cpp]
Modified: sandbox/local/libs/local/doc/qbk/tutorial.qbk
==============================================================================
--- sandbox/local/libs/local/doc/qbk/tutorial.qbk (original)
+++ sandbox/local/libs/local/doc/qbk/tutorial.qbk 2011-10-04 11:00:03 EDT (Tue, 04 Oct 2011)
@@ -72,7 +72,7 @@
return 10;
}
-The ISO C++ standard does not allow pass empty parameters to a macro so the macro `__BOOST_LOCAL_FUNCTION_PARAMS__` cannot be invoked with an empty set of parenthesis `()` unless programmers use compiler extensions that support empty macro parameters (e.g., C99 and other modern compilers).
+The __CPP03__ standard does not allow pass empty parameters to a macro so the macro `__BOOST_LOCAL_FUNCTION_PARAMS__` cannot be invoked with an empty set of parenthesis `()` unless programmers use compiler extensions that support empty macro parameters (e.g., __C99__ standard and most modern compilers).
However, C++ also allows to specify an empty parameter list using the keyword `void`:
int ten(void) {
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