Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69228 - in sandbox/local: . boost/local boost/local/aux_ boost/local/aux_/function_macros libs/local/doc libs/local/doc/html libs/local/doc/html/boost_local libs/local/doc/qbk libs/local/example
From: lorcaminiti_at_[hidden]
Date: 2011-02-23 22:48:19


Author: lcaminiti
Date: 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
New Revision: 69228
URL: http://svn.boost.org/trac/boost/changeset/69228

Log:
Reworked all examples. Impl exits and blocks.
Removed:
   sandbox/local/libs/local/example/same_line.cpp
Text files modified:
   sandbox/local/TODO.txt | 2
   sandbox/local/boost/local/aux_/function_macros/params.hpp | 4
   sandbox/local/boost/local/aux_/symbol.hpp | 4
   sandbox/local/boost/local/function.hpp | 32 ++-
   sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html | 8
   sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html | 2
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html | 8
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html | 8
   sandbox/local/libs/local/doc/html/boost_local/Advanced.html | 162 ++++++++-----------
   sandbox/local/libs/local/doc/html/boost_local/Grammar.html | 12
   sandbox/local/libs/local/doc/html/boost_local/Rationale.html | 8
   sandbox/local/libs/local/doc/html/boost_local/Starting.html | 10
   sandbox/local/libs/local/doc/html/boost_local/Tutorial.html | 124 ++++++--------
   sandbox/local/libs/local/doc/html/index.html | 327 +++++++++++++++++++++++++--------------
   sandbox/local/libs/local/doc/html/reference.html | 45 ----
   sandbox/local/libs/local/doc/html/standalone_HTML.manifest | 15 -
   sandbox/local/libs/local/doc/jamfile.jam | 6
   sandbox/local/libs/local/doc/qbk/introduction.qbk | 30 +++
   sandbox/local/libs/local/doc/qbk/local.qbk | 2
   sandbox/local/libs/local/example/add.cpp | 26 +-
   sandbox/local/libs/local/example/add_num.cpp | 9
   sandbox/local/libs/local/example/add_num_sum.cpp | 7
   sandbox/local/libs/local/example/add_optimizers.cpp | 11
   sandbox/local/libs/local/example/add_this.cpp | 8
   sandbox/local/libs/local/example/block.cpp | 2
   sandbox/local/libs/local/example/doit.cpp | 17 -
   sandbox/local/libs/local/example/exit.cpp | 9
   sandbox/local/libs/local/example/find_if.cpp | 11
   sandbox/local/libs/local/example/print_map.cpp | 18 -
   sandbox/local/libs/local/example/transform.cpp | 17 -
   30 files changed, 483 insertions(+), 461 deletions(-)

Modified: sandbox/local/TODO.txt
==============================================================================
--- sandbox/local/TODO.txt (original)
+++ sandbox/local/TODO.txt 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -9,6 +9,8 @@
 
 * Rename function_ref to function (because it now has a default constructor so it's not a reference anymore).
 
+* Document that PARAMS cannot appear on same line because they use __LINE__ to generate unique IDs (there's no way around this because this macro doesn't know the function name).
+
 
 * Double check all local function syntax elements (from Grammar) -- auto, register, etc.
 

Modified: sandbox/local/boost/local/aux_/function_macros/params.hpp
==============================================================================
--- sandbox/local/boost/local/aux_/function_macros/params.hpp (original)
+++ sandbox/local/boost/local/aux_/function_macros/params.hpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -47,10 +47,10 @@
 // typename_keyword: `typename` in type depended context (i.e., templates),
 // `EMPTY()` otherwise.
 #define BOOST_LOCAL_AUX_FUNCTION_PARAMS( \
- parenthesized_params, typename_keyword) \
+ parenthesized_params, id, typename_keyword) \
     BOOST_LOCAL_AUX_FUNCTION_PARAMS_( \
             BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS(parenthesized_params), \
- __LINE__, typename_keyword)
+ id, typename_keyword)
 
 #endif // #include guard
 

Modified: sandbox/local/boost/local/aux_/symbol.hpp
==============================================================================
--- sandbox/local/boost/local/aux_/symbol.hpp (original)
+++ sandbox/local/boost/local/aux_/symbol.hpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -71,8 +71,8 @@
 #define BOOST_LOCAL_AUX_SYMBOL_BODY_FUNCTION_NAME \
     BOOST_LOCAL_AUX_INTERNAL_SYMBOL(body)
 
-#define BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME \
- BOOST_LOCAL_AUX_INTERNAL_SYMBOL(block_function)
+#define BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME(id) \
+ BOOST_LOCAL_AUX_INTERNAL_SYMBOL(BOOST_PP_CAT(block_function, id))
 
 #define BOOST_LOCAL_AUX_SYMBOL_INIT_RECURSION_FUNCTION_NAME \
     BOOST_LOCAL_AUX_INTERNAL_SYMBOL(init_recursion)

Modified: sandbox/local/boost/local/function.hpp
==============================================================================
--- sandbox/local/boost/local/function.hpp (original)
+++ sandbox/local/boost/local/function.hpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -10,7 +10,7 @@
 #include "aux_/function_macros/params.hpp"
 #include "aux_/function_macros/name.hpp"
 #include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/config.hpp> // Handle variadic macros.
+#include <boost/config.hpp> // For variadic macros.
 
 // Params.
 
@@ -19,28 +19,30 @@
 // params and nothing `` for no params.
 #if defined(BOOST_NO_VARIADIC_MACROS)
 
-# define BOOST_LOCAL_FUNCTION_PARAMS(parenthesized_params) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(parenthesized_params, BOOST_PP_EMPTY())
+#define BOOST_LOCAL_FUNCTION_PARAMS(parameter_list) \
+ BOOST_LOCAL_AUX_FUNCTION_PARAMS(parameter_list, __LINE__, BOOST_PP_EMPTY())
 
-# define BOOST_LOCAL_FUNCTION_PARAMS_TPL(parenthesized_params) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(parenthesized_params, typename)
+#define BOOST_LOCAL_FUNCTION_PARAMS_TPL(parameter_list) \
+ BOOST_LOCAL_AUX_FUNCTION_PARAMS(parameter_list, __LINE__, typename)
 
 #else // BOOST_NO_VARIADIC_MACROS
 
-# include "aux_/preprocessor/va.hpp"
+#include "aux_/preprocessor/va.hpp"
 
-# define BOOST_LOCAL_FUNCTION_PARAMS(...) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__), BOOST_PP_EMPTY())
-
-# define BOOST_LOCAL_FUNCTION_PARAMS_TPL(...) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__), typename)
+#define BOOST_LOCAL_FUNCTION_PARAMS(...) \
+ BOOST_LOCAL_AUX_FUNCTION_PARAMS(BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__), \
+ __LINE__, BOOST_PP_EMPTY())
+
+#define BOOST_LOCAL_FUNCTION_PARAMS_TPL(...) \
+ BOOST_LOCAL_AUX_FUNCTION_PARAMS(BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__), \
+ __LINE__, typename)
 
 #endif // BOOST_NO_VARIADIC_MACROS
 
-#define BOOST_LOCAL_FUNCTION_NAME(name) \
- BOOST_LOCAL_AUX_FUNCTION_NAME(name)
+#define BOOST_LOCAL_FUNCTION_NAME(local_function_name) \
+ BOOST_LOCAL_AUX_FUNCTION_NAME(local_function_name)
 
 namespace boost { namespace local {
 

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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Boost.Local 0.1.1">
 <link rel="up" href="reference.html#header.boost.utility.identity_hpp" title="Header &lt;boost/utility/identity.hpp&gt;">
-<link rel="prev" href="boost/local/function_ref.html" title="Struct template function_ref">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">
 <link rel="next" href="BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="boost/local/function_ref.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_IDENTITY_TYPE"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div>
 <div class="refsect1">
-<a name="id891489"></a><h2>Description</h2>
+<a name="id889882"></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.html" title="Advanced">Advanced</a> section).</p>
 <p>For example <code class="computeroutput">BOOST_IDENTITY_TYPE((std::map&lt;int, double&gt;))</code> can be passed as a single macro parameter when instead <code class="computeroutput">std::map&lt;int, double&gt;</code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
@@ -62,7 +62,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="boost/local/function_ref.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -33,7 +33,7 @@
 
 </span>BOOST_IDENTITY_VALUE(parenthesized_value)</pre></div>
 <div class="refsect1">
-<a name="id891630"></a><h2>Description</h2>
+<a name="id890022"></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.html" title="Advanced">Advanced</a> section).</p>
 <p>For example <code class="computeroutput">BOOST_IDENTITY_VALUE((key_size&lt;int, double&gt;::value))</code> can be passed as a single macro parameter when instead <code class="computeroutput">key_size&lt;int, double&gt;::value</code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>

Modified: sandbox/local/libs/local/doc/html/BOOST_LOCAL_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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Boost.Local 0.1.1">
 <link rel="up" href="reference.html#header.boost.local.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">
-<link rel="prev" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">
+<link rel="prev" href="reference.html" title="Reference">
 <link rel="next" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html" title="Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_BLOCK_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</pre></div>
 <div class="refsect1">
-<a name="id888420"></a><h2>Description</h2>
+<a name="id888173"></a><h2>Description</h2>
 <p><span class="bold"><strong>Note:</strong></span> If programmers leave this macro undefined, its default value is <code class="computeroutput">5</code>.</p>
 <p>This only refers to the number of local function parameters and not to the number of bound variables in scope (the limit on the number of bound variables is instead the maximum size allowed for a Boost.Preprocessor sequences).</p>
 <p><span class="bold"><strong>Warning:</strong></span> Increasing this number will increase compilation time.</p>
@@ -50,7 +50,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_BLOCK_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Boost.Local 0.1.1">
 <link rel="up" href="reference.html#header.boost.local.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">
 <link rel="prev" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">
-<link rel="next" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">
+<link rel="next" href="boost/local/function.html" title="Struct template function">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost/local/function.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</pre></div>
 <div class="refsect1">
-<a name="id888519"></a><h2>Description</h2>
+<a name="id888272"></a><h2>Description</h2>
 <p><span class="bold"><strong>Note:</strong></span> If programmers leave this macro undefined, the default symbol used is <code class="computeroutput">this_</code>.</p>
 <p><span class="bold"><strong>Warning:</strong></span> Programmers should not define this macro unless it is absolutely necessary (e.g., to avoid name clashes with another library which cannot be changed). Changing the symbol <code class="computeroutput">this_</code> effectively changes the public API of this library.</p>
 <p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Starting.html" title="Starting">Starting</a> section. </p>
@@ -49,7 +49,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost/local/function.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/local/libs/local/doc/html/boost_local/Advanced.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Advanced.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Advanced.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -194,7 +194,7 @@
 </span> <span class="special">)</span>
 </pre>
 <p>
- Consider the following complete example: <sup>[<a name="id875947" href="#ftn.id875947" class="footnote">15</a>]</sup>
+ Consider the following complete example: <sup>[<a name="id876719" href="#ftn.id876719" class="footnote">15</a>]</sup>
       </p>
 <p>
         
@@ -213,24 +213,20 @@
 <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">sign_t</span><span class="special">;</span>
 
 <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span>
             <span class="comment">// Identity macors handle commas.
-</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;&amp;)))(</span><span class="identifier">m</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_t</span><span class="special">&amp;)(</span><span class="identifier">factor</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">BOOST_IDENTITY_VALUE</span><span class="special">((</span><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">)))</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;)(</span><span class="identifier">separator</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="identifier">cat</span><span class="special">(</span><span class="string">":"</span><span class="special">,</span> <span class="string">" "</span><span class="special">))</span>
+</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;))&amp;</span> <span class="identifier">m</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_t</span><span class="special">&amp;</span> <span class="identifier">factor</span><span class="special">)(</span><span class="keyword">default</span> <span class="comment">// Or just use `(default (...))`.
+</span> <span class="identifier">BOOST_IDENITY_VALUE</span><span class="special">((</span><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">)))</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">separator</span><span class="special">)(</span><span class="keyword">default</span> <span class="identifier">cat</span><span class="special">(</span><span class="string">":"</span><span class="special">,</span> <span class="string">" "</span><span class="special">))</span>
             <span class="comment">// Also, identity macors handle leading symbols.
-</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((::</span><span class="identifier">sign_t</span><span class="special">)))(</span><span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">BOOST_IDENTITY_VALUE</span><span class="special">((-</span><span class="number">1</span><span class="special">)))</span>
- <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((::</span><span class="identifier">sign_t</span><span class="special">))</span> <span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span> <span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
                 <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
             <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span><span class="special">-&gt;</span><span class="identifier">first</span> <span class="special">&lt;&lt;</span> <span class="identifier">separator</span> <span class="special">&lt;&lt;</span>
                     <span class="identifier">sign</span> <span class="special">*</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">i</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">)</span> <span class="special">*</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
         <span class="special">}</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">print</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">print</span><span class="special">)</span>
 
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;</span> <span class="identifier">sizes</span><span class="special">;</span>
     <span class="identifier">sizes</span><span class="special">[</span><span class="string">"a"</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">sizes</span><span class="special">[</span><span class="string">"ab"</span><span class="special">]</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="identifier">sizes</span><span class="special">[</span><span class="string">"abc"</span><span class="special">]</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
@@ -264,30 +260,24 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
 
 <span class="keyword">int</span> <span class="identifier">main</span> <span class="special">()</span> <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span>
- <span class="identifier">v</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
- <span class="identifier">v</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="number">7</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostringstream</span> <span class="identifier">factorials</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostringstream</span> <span class="identifier">output</span><span class="special">;</span>
 
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">factorial</span><span class="special">)(</span>
- <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">n</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">bool</span><span class="special">)(</span><span class="identifier">recursion</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="keyword">false</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">factorials</span><span class="special">))</span>
- <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span> <span class="special">(</span><span class="keyword">bool</span> <span class="identifier">recursion</span><span class="special">)(</span><span class="keyword">default</span> <span class="keyword">false</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">output</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="keyword">int</span> <span class="identifier">result</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
 
         <span class="keyword">if</span> <span class="special">(</span><span class="identifier">n</span> <span class="special">&lt;</span> <span class="number">2</span> <span class="special">)</span> <span class="identifier">result</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
         <span class="keyword">else</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">,</span> <span class="keyword">true</span><span class="special">);</span> <span class="comment">// Recursive call.
 </span>
- <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">recursion</span><span class="special">)</span> <span class="identifier">factorials</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">recursion</span><span class="special">)</span> <span class="identifier">output</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
         <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span>
 
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+ <span class="identifier">v</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="number">7</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">factorial</span><span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">factorials</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">output</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
     <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
@@ -295,9 +285,9 @@
       </p>
 <p>
         The original local function name as specified in the parenthesized signature
- passed to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ passed to <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>
         must always be used for recursive calls even when the function is renamed
- using <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ using <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code>
         (see renamed local functions later in this section).
       </p>
 </div>
@@ -391,14 +381,9 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
 
 <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">inline</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="comment">// Inlined local function.
-</span> <span class="special">(</span><span class="keyword">auto</span><span class="special">)(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="comment">// Auto parameter.
-</span> <span class="special">(</span><span class="keyword">register</span><span class="special">)(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)</span> <span class="comment">// Register parameter.
-</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">auto</span> <span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">register</span> <span class="keyword">int</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">add</span><span class="special">(</span><span class="number">3</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 
@@ -426,22 +411,22 @@
           Local functions are never copied by value. You can only obtain a reference
           to a local function therefore you need to make sure that the <span class="bold"><strong>local function survives the scope of its reference</strong></span>
           otherwise the reference will be invalid and its use will generate a run-time
- error (as usual with C++ references). <sup>[<a name="id880468" href="#ftn.id880468" class="footnote">16</a>]</sup>
+ error (as usual with C++ references). <sup>[<a name="id881035" href="#ftn.id881035" class="footnote">16</a>]</sup>
         </p></td></tr>
 </table></div>
 <p>
         For this purpose, it is possible to assign a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span></code>
         functor to a local function (see also Boost.Function).
- However, it is in general preferable to use the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code>
+ However, it is in general preferable to use the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span>function_ref</code>
         functor instead because its API also supports default parameters.
       </p>
 <p>
- The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> template
+ The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span>function_ref</code> template
         takes two parameters (see the Reference
         section):
       </p>
 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">defaults</span> <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
-<span class="keyword">class</span> <code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
+<span class="keyword">class</span> <code class="computeroutput">function_ref</code> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
 </pre>
 <p>
         Where:
@@ -451,8 +436,8 @@
             specifies the function signature using the same syntax as Boost.Function's
             preferred syntax. For example:
           </li></ul></div>
-<pre class="programlisting"><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">()</span> <span class="special">&gt;</span> <span class="comment">// Returns `int` and takes no parameter.
-</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// Returns `int`and takes two parameters: a `double` followed by a `char`.
+<pre class="programlisting"><code class="computeroutput">function_ref</code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">()</span> <span class="special">&gt;</span> <span class="comment">// Returns `int` and takes no parameter.
+</span><code class="computeroutput">function_ref</code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// Returns `int`and takes two parameters: a `double` followed by a `char`.
 </span></pre>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
             The template parameter <code class="computeroutput"><span class="identifier">defaults</span></code>
@@ -466,9 +451,9 @@
             This template parameter is optional and it is <code class="computeroutput"><span class="number">0</span></code>
             by default. For example:
           </li></ul></div>
-<pre class="programlisting"><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// No default: All parameters must be specified.
-</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">1</span> <span class="special">&gt;</span> <span class="comment">// 1 default: The last `char` parameter is optional.
-</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="comment">// 2 defaults: All parameters are optional.
+<pre class="programlisting"><code class="computeroutput">function_ref</code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// No default: All parameters must be specified.
+</span><code class="computeroutput">function_ref</code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">1</span> <span class="special">&gt;</span> <span class="comment">// 1 default: The last `char` parameter is optional.
+</span><code class="computeroutput">function_ref</code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="comment">// 2 defaults: All parameters are optional.
 </span></pre>
 <p>
         For example:
@@ -476,14 +461,13 @@
 <p>
         
 </p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function_ref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
 
-<span class="comment">// Using `function_ref` allows to use the same functor for all calls
-</span><span class="comment">// (regardless of which set of default parameters is specified).
-</span><span class="keyword">void</span> <span class="identifier">doit</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_ref</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span> <span class="special">{</span>
+<span class="comment">// Using `function` allows to use the same functor for all calls (regardless of
+</span><span class="comment">// which set of default parameters is specified).
+</span><span class="keyword">void</span> <span class="identifier">doit</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">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span> <span class="special">{</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
@@ -502,15 +486,13 @@
     <span class="special">{</span>
         <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
     
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">linear</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">1</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">2</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">)(</span> <span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">1</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">2</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">i</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
             <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">+</span> <span class="identifier">i</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">linear</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">linear</span><span class="special">)</span>
 
         <span class="comment">// Assign local functions variables.
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">function_ref</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">;</span>
+</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">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">;</span>
         <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span> <span class="identifier">l</span><span class="special">();</span> <span class="comment">// All calls because of default parameters.
 </span> <span class="identifier">l2</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">;</span>
         <span class="identifier">l2</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span> <span class="comment">// Only one call operation (without default parameters).
@@ -539,33 +521,33 @@
       Local Functions</a>
 </h3></div></div></div>
 <p>
- Local functions can be renamed using the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
- macro instead of <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>:
+ Local functions can be renamed using the <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code>
+ macro instead of <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code>:
       </p>
-<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code><span class="special">(</span><span class="emphasis"><em>new-local-function-name</em></span><span class="special">)</span>
+<pre class="programlisting"><code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code><span class="special">(</span><span class="emphasis"><em>new-local-function-name</em></span><span class="special">)</span>
 </pre>
 <p>
         Where the <span class="emphasis"><em>new-local-function-name</em></span> no longer has to match
         the local function name as originally specified in the parenthesized signature
- passed to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>.
- For example: <sup>[<a name="id883170" href="#ftn.id883170" class="footnote">17</a>]</sup>
+ passed to <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>.
+ For example: <sup>[<a name="id883549" href="#ftn.id883549" class="footnote">17</a>]</sup>
       </p>
 <pre class="programlisting"><span class="special">{</span>
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span>
     <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">)</span>
     <span class="special">)</span> <span class="special">{</span>
         <span class="special">...</span> <span class="comment">// Body uses original name `l`.
-</span> <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span> <span class="comment">// Renamed to `m`.
+</span> <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span> <span class="comment">// Renamed to `m`.
 </span>
     <span class="special">...</span> <span class="comment">// Enclosing scope uses new name `m`.
 </span><span class="special">}</span>
 </pre>
 <p>
- Note that the local function is renamed only after the call to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>.
+ Note that the local function is renamed only after the call to <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code>.
         Therefore, within the local function body the original local function name
- as specified by <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ as specified by <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>
         must be used (e.g., to recursively call the local function). However, within
- the enclosing scope only the new local function name as specified by <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ the enclosing scope only the new local function name as specified by <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code>
         is available.
       </p>
 <p>
@@ -605,7 +587,7 @@
 <p>
       </p>
 <a name="boost_local.Advanced.renaming_local_functions.motivation"></a><h6>
-<a name="id884117"></a>
+<a name="id884469"></a>
         <a class="link" href="Advanced.html#boost_local.Advanced.renaming_local_functions.motivation">Motivation</a>
       </h6>
 <p>
@@ -672,70 +654,70 @@
         to usual features of C++ functions.
       </p>
 <a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.overloading"></a><h6>
-<a name="id885108"></a>
+<a name="id885459"></a>
         <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.overloading">Overloading</a>
       </h6>
 <p>
         It is not possible to overload local functions. Declaring multiple local
         functions with the same name within the same enclosing scope generates a
         compile-time error (even if the different declarations specify different
- parameters). <sup>[<a name="id885128" href="#ftn.id885128" class="footnote">18</a>]</sup>
+ parameters). <sup>[<a name="id885479" href="#ftn.id885479" class="footnote">18</a>]</sup>
       </p>
 <p>
         For example, the following code will <span class="bold"><strong>not</strong></span>
         compile:
       </p>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{</span>
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span>
     <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span>
     <span class="special">)</span> <span class="special">{</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
 
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span>
     <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">d</span><span class="special">)</span> <span class="special">)</span>
     <span class="special">)</span> <span class="special">{</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">d</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span> <span class="comment">// Error: Cannot overload.
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span> <span class="comment">// Error: Cannot overload.
 </span>
     <span class="special">...</span>
 <span class="special">}</span>
 </pre>
 <a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.nesting"></a><h6>
-<a name="id885592"></a>
+<a name="id885921"></a>
         <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.nesting">Nesting</a>
       </h6>
 <p>
         It is not possible to nest local functions, local blocks, or local exits
- within each other. Nesting will generate a compile-time error. <sup>[<a name="id885614" href="#ftn.id885614" class="footnote">19</a>]</sup>
+ within each other. Nesting will generate a compile-time error. <sup>[<a name="id885943" href="#ftn.id885943" class="footnote">19</a>]</sup>
       </p>
 <p>
         For example, the following code will <span class="bold"><strong>not</strong></span>
         compile:
       </p>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{</span>
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span>
     <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span>
     <span class="special">)</span> <span class="special">{</span>
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="comment">// Error: Cannot nest.
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span> <span class="comment">// Error: Cannot nest.
 </span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">m</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">j</span><span class="special">)</span> <span class="special">)</span>
         <span class="special">)</span> <span class="special">{</span>
             <span class="keyword">return</span> <span class="identifier">j</span> <span class="special">*</span> <span class="number">10</span><span class="special">;</span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span>
 
         <span class="keyword">return</span> <span class="identifier">m</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">*</span> <span class="number">10</span><span class="special">;</span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
 
     <span class="special">...</span>
 <span class="special">}</span>
 </pre>
 <a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.operators"></a><h6>
-<a name="id886036"></a>
+<a name="id886343"></a>
         <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.operators">Operators</a>
       </h6>
 <p>
         Local functions cannot be operators. Naming a local function <code class="computeroutput"><span class="keyword">operator</span><span class="special">...</span></code>
- will generate a compile-time error. <sup>[<a name="id886073" href="#ftn.id886073" class="footnote">20</a>]</sup>
+ will generate a compile-time error. <sup>[<a name="id886380" href="#ftn.id886380" class="footnote">20</a>]</sup>
       </p>
 <p>
         For example, the following code will <span class="bold"><strong>not</strong></span>
@@ -747,17 +729,17 @@
         <span class="keyword">double</span> <span class="identifier">y</span><span class="special">;</span>
     <span class="special">};</span>
 
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="comment">// Error: Cannot be `operator==`.
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span> <span class="comment">// Error: Cannot be `operator==`.
 </span> <span class="special">(</span><span class="keyword">bool</span><span class="special">)</span> <span class="special">(</span><span class="keyword">operator</span><span class="special">==)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">point</span><span class="special">&amp;)(</span><span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">point</span><span class="special">&amp;)(</span><span class="identifier">q</span><span class="special">)</span> <span class="special">)</span>
     <span class="special">)</span> <span class="special">{</span>
         <span class="keyword">return</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">x</span> <span class="special">==</span> <span class="identifier">q</span><span class="special">.</span><span class="identifier">x</span> <span class="special">&amp;&amp;</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">y</span> <span class="special">==</span> <span class="identifier">q</span><span class="special">.</span><span class="identifier">y</span><span class="special">;</span>
- <span class="special">)</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="keyword">operator</span><span class="special">==)</span>
+ <span class="special">)</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="keyword">operator</span><span class="special">==)</span>
 
     <span class="special">...</span>
 <span class="special">}</span>
 </pre>
 <a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.etc"></a><h6>
-<a name="id886479"></a>
+<a name="id886775"></a>
         <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.etc">Etc</a>
       </h6>
 <p>
@@ -1062,39 +1044,39 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id875947" href="#id875947" class="para">15</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id876719" href="#id876719" class="para">15</a>] </sup>
           We recognize that the use of the <span class="emphasis"><em>identity macros</em></span> adds
           extra parenthesis to the already significant number of parenthesis required
           by the parenthesized syntax. However, parenthesized signatures usually
           do not contain unwrapped commas "<code class="computeroutput"><span class="special">,</span></code>"
           (unless template metaprogramming is being used).
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id880468" href="#id880468" class="para">16</a>] </sup>
- The suffix <code class="computeroutput"><span class="identifier">ref</span></code> of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> is meant
+<div class="footnote"><p><sup>[<a id="ftn.id881035" href="#id881035" class="para">16</a>] </sup>
+ The suffix <code class="computeroutput"><span class="identifier">ref</span></code> of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span>function_ref</code> is meant
             to help programmers remember that they are dealing with references to
             (and not copies of) local functions.
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id883170" href="#id883170" class="para">17</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id883549" href="#id883549" class="para">17</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> Local functions are often named
           <code class="computeroutput"><span class="identifier">l</span></code> in the casual examples
           of this documentation because the name of the author starts with the letter
           "<code class="computeroutput"><span class="identifier">l</span></code>". <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span>
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id885128" href="#id885128" class="para">18</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id885479" href="#id885479" class="para">18</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> This is because a local function
           is a functor object declared as a local variable within the enclosing scope.
           Therefore, declaring two local functions with the same name within the
           same enclosing scope declares two local variables with the same name within
           the same scope and that is not allowed in C++.
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id885614" href="#id885614" class="para">19</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id885943" href="#id885943" class="para">19</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> This is because within a nested
           code block only global or static variables can be accessed while Boost.ScopeExit
           variable <a href="http://lists.boost.org/Archives/boost/2006/11/113658.php" target="_top">binding
           mechanism</a> requires to access local variables that hold the bound
           variables.
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id886073" href="#id886073" class="para">20</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id886380" href="#id886380" class="para">20</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> This is the because a local
           function name must be a valid local variable name (the local variable to
           hold the local functor object) and operators cannot be used as local variable

Modified: sandbox/local/libs/local/doc/html/boost_local/Grammar.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Grammar.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Grammar.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -70,9 +70,9 @@
       Macros using the parenthesized syntax (see the Reference
       section):
     </p>
-<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</em></span> <span class="special">)</span>
-<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
-<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<pre class="programlisting"><code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</em></span> <span class="special">)</span>
+<code class="computeroutput">BOOST_LOCAL_BLOCK</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<code class="computeroutput">BOOST_LOCAL_EXIT</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
 </pre>
 <p>
       Additional "keywords":
@@ -132,7 +132,7 @@
         <span class="special">(</span><span class="keyword">default</span><span class="special">)(</span><span class="bold"><strong>parameter-default</strong></span><span class="special">)</span> <span class="comment">// Default value for this optional parameter.
 </span></pre>
 <p>
- Binding variables in scope: <sup>[<a name="id892436" href="#ftn.id892436" class="footnote">21</a>]</sup> <sup>[<a name="id892741" href="#ftn.id892741" class="footnote">22</a>]</sup>
+ Binding variables in scope: <sup>[<a name="id890813" href="#ftn.id890813" class="footnote">21</a>]</sup> <sup>[<a name="id891118" href="#ftn.id891118" class="footnote">22</a>]</sup>
     </p>
 <pre class="programlisting"><span class="emphasis"><em>bindings:</em></span>
           <span class="emphasis"><em>const-bindings</em></span> <span class="comment">// Only constant binding.
@@ -151,7 +151,7 @@
 </span></pre>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id892436" href="#id892436" class="para">21</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id890813" href="#id890813" class="para">21</a>] </sup>
         <span class="bold"><strong>Rationale.</strong></span> The alternative syntax <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)...)</span></code>
         would have been preferred because <code class="computeroutput"><span class="keyword">const</span></code>
         appears before the reference as usual in C++ and because a single <code class="computeroutput"><span class="identifier">bind</span></code> sequence is used for both plain and
@@ -172,7 +172,7 @@
         symbol <code class="computeroutput"><span class="special">&amp;</span></code> never appears in
         the back).
       </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id892741" href="#id892741" class="para">22</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id891118" href="#id891118" class="para">22</a>] </sup>
         <span class="bold"><strong>Rationale.</strong></span> Binding is used within the function
         parameter list because this syntax seemed natural given that the bound variables
         are used by the function body as if they were function parameters (only their

Modified: sandbox/local/libs/local/doc/html/boost_local/Rationale.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Rationale.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Rationale.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -1018,7 +1018,7 @@
               Default parameter values are not part of the type so it is not possible
               to program a metafunction that counts the number of default parameter
               values at compile-time but such information is also needed by the local
- functions in order to properly support default parameters. <sup>[<a name="id900828" href="#ftn.id900828" class="footnote">23</a>]</sup>
+ functions in order to properly support default parameters. <sup>[<a name="id899064" href="#ftn.id899064" class="footnote">23</a>]</sup>
             </li>
 </ol></div>
 <p>
@@ -1037,7 +1037,7 @@
           Note that the <code class="computeroutput"><span class="special">=</span></code> symbol needs
           to be replaced with the alphanumeric keyword <code class="computeroutput"><span class="keyword">default</span></code>
           because parenthesized syntax elements cannot start with a non alphanumeric
- symbol like <code class="computeroutput"><span class="special">=</span></code>. <sup>[<a name="id901227" href="#ftn.id901227" class="footnote">24</a>]</sup>
+ symbol like <code class="computeroutput"><span class="special">=</span></code>. <sup>[<a name="id899464" href="#ftn.id899464" class="footnote">24</a>]</sup>
         </p>
 <p>
           For C99, some or all the parenthesis can be replaced by commas.
@@ -1215,7 +1215,7 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id900828" href="#id900828" class="para">23</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id899064" href="#id899064" class="para">23</a>] </sup>
                 Specifically, the number of default parameter value is needed at
                 compile-time to instantiate the proper <code class="computeroutput"><span class="identifier">function_ref</span><span class="special">&lt;</span><span class="keyword">typename</span>
                 <span class="identifier">F</span><span class="special">,</span>
@@ -1224,7 +1224,7 @@
                 functor is needed to implement the trick that allows local functions
                 to be passed as template parameters (see http://lists.boost.org/Archives/boost/2010/09/170888.php).
               </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id901227" href="#id901227" class="para">24</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id899464" href="#id899464" class="para">24</a>] </sup>
             This is because the parenthesized syntax needs to check if its token
             matches a keyword like <code class="computeroutput"><span class="keyword">void</span></code>,
             <code class="computeroutput"><span class="keyword">inline</span></code>, etc. This checking

Modified: sandbox/local/libs/local/doc/html/boost_local/Starting.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Starting.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Starting.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -175,9 +175,9 @@
         The header files of this library are divided as follow:
       </p>
 <pre class="programlisting"><code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a></code> <span class="emphasis"><em>local functions</em></span>
-<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">boost/local/block.hpp</a></code> <span class="emphasis"><em>local blocks</em></span>
-<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">boost/local/exit.hpp</a></code> <span class="emphasis"><em>local exits</em></span>
-<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.function_ref_hpp" title="Header &lt;boost/local/function_ref.hpp&gt;">boost/local/function_ref.hpp</a></code> <span class="emphasis"><em>references to local functions</em></span>
+<code class="computeroutput">boost/local/block.hpp</code> <span class="emphasis"><em>local blocks</em></span>
+<code class="computeroutput">boost/local/exit.hpp</code> <span class="emphasis"><em>local exits</em></span>
+<code class="computeroutput">boost/local/function_ref.hpp</code> <span class="emphasis"><em>references to local functions</em></span>
 </pre>
 </div>
 <div class="section">
@@ -186,7 +186,7 @@
 </h3></div></div></div>
 <p>
         The following symbols are part of the library private API, they are not documented,
- and they should not be directly used by programmers: <sup>[<a name="id864005" href="#ftn.id864005" class="footnote">1</a>]</sup>
+ and they should not be directly used by programmers: <sup>[<a name="id865071" href="#ftn.id865071" class="footnote">1</a>]</sup>
       </p>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
@@ -226,7 +226,7 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id864005" href="#id864005" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id865071" href="#id865071" class="para">1</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/Tutorial.html
==============================================================================
--- sandbox/local/libs/local/doc/html/boost_local/Tutorial.html (original)
+++ sandbox/local/libs/local/doc/html/boost_local/Tutorial.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -67,17 +67,17 @@
           are:
         </p>
 <p>
- 1. Wrap all the signature syntactic elements within parenthesis <code class="computeroutput"><span class="special">()</span></code>. <sup>[<a name="id864328" href="#ftn.id864328" class="footnote">2</a>]</sup>
+ 1. Wrap all the signature syntactic elements within parenthesis <code class="computeroutput"><span class="special">()</span></code>. <sup>[<a name="id865394" href="#ftn.id865394" class="footnote">2</a>]</sup>
         </p>
 <p>
           2. If a token does not start with an alphanumeric symbol (i.e., <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>, or <code class="computeroutput"><span class="number">0</span><span class="special">-</span><span class="number">9</span></code>), replace
           the token with its alphanumeric equivalent (as indicated in the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
- section). <sup>[<a name="id864455" href="#ftn.id864455" class="footnote">3</a>]</sup>
+ section). <sup>[<a name="id865521" href="#ftn.id865521" class="footnote">3</a>]</sup>
         </p>
 <p>
           3. Empty parenthesis <code class="computeroutput"><span class="special">()</span></code> are
- not allowed. <sup>[<a name="id864491" href="#ftn.id864491" class="footnote">4</a>]</sup>
+ not allowed. <sup>[<a name="id865557" href="#ftn.id865557" class="footnote">4</a>]</sup>
         </p>
 <p>
           4. Spaces and newlines do not matter and they can be used anywhere.
@@ -162,11 +162,11 @@
           (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section). When
           syntactic errors can be detected by the parsing macros, they are raised
           at compile-time using error messages of the form <code class="computeroutput"><span class="identifier">ERROR_</span></code><span class="emphasis"><em>description_text</em></span>.
- <sup>[<a name="id865437" href="#ftn.id865437" class="footnote">5</a>]</sup>
+ <sup>[<a name="id866504" href="#ftn.id866504" class="footnote">5</a>]</sup>
         </p></td></tr>
 </table></div>
 <a name="boost_local.Tutorial.parenthesized_syntax.functions_with_no_parameters"></a><h6>
-<a name="id865476"></a>
+<a name="id866543"></a>
         <a class="link" href="Tutorial.html#boost_local.Tutorial.parenthesized_syntax.functions_with_no_parameters">Functions
         With No Parameters</a>
       </h6>
@@ -233,11 +233,11 @@
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
 </span> <span class="special">...</span>
 
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <code class="computeroutput">BOOST_LOCAL_FUNCTION</code><span class="special">(</span>
     <span class="emphasis"><em>parenthesized-signature</em></span>
     <span class="special">)</span> <span class="special">{</span>
         <span class="emphasis"><em>local-function-body</em></span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="emphasis"><em>local-function-name</em></span><span class="special">)</span>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code><span class="special">(</span><span class="emphasis"><em>local-function-name</em></span><span class="special">)</span>
 
     <span class="special">...</span>
 <span class="special">}</span>
@@ -254,7 +254,7 @@
           </li>
 <li class="listitem">
             The local function signature is expressed using the parenthesized syntax
- and passed to the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ and passed to the <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>
             macro.
           </li>
 <li class="listitem">
@@ -262,14 +262,14 @@
             <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 line numbers retain their
- usual meaning. <sup>[<a name="id865969" href="#ftn.id865969" class="footnote">6</a>]</sup>
+ usual meaning. <sup>[<a name="id867024" href="#ftn.id867024" class="footnote">6</a>]</sup>
           </li>
 <li class="listitem">
- The macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ The macro <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code>
             is used to end the local function definition and it must repeat the local
- function name. <sup>[<a name="id866003" href="#ftn.id866003" class="footnote">7</a>]</sup> The compiler will generate an error if the name specified
+ function name. <sup>[<a name="id867054" href="#ftn.id867054" class="footnote">7</a>]</sup> The compiler will generate an error if the name specified
             by this macro does not match the one from the local function signature
- (see <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ (see <code class="computeroutput">BOOST_LOCAL_FUNCTION_END_RENAME</code>
             to remove this constraint).
           </li>
 </ul></div>
@@ -290,10 +290,10 @@
         is explained later in this section).
       </p>
 <p>
- Then we pass the parenthesized signature to the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ Then we pass the parenthesized signature to the <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>
         macro, we implement a simple body that prints the number, and we pass the
         local function name <code class="computeroutput"><span class="identifier">add</span></code> to
- the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ the <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code>
         macro:
       </p>
 <p>
@@ -303,14 +303,11 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
 
 <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="identifier">num</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
     <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
-
     <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
@@ -333,7 +330,7 @@
         be bound by reference, by constant reference, by value, or by constant value.
         The types of bound variables are automatically deduced by this library using
         <a href="http://www.boost.org/doc/libs/release/doc/html/typeof.html" target="_top">Boost.Typeof</a>.
- <sup>[<a name="id866621" href="#ftn.id866621" class="footnote">8</a>]</sup>
+ <sup>[<a name="id867618" href="#ftn.id867618" class="footnote">8</a>]</sup>
       </p>
 <div class="important"><table border="0" summary="Important">
 <tr>
@@ -420,28 +417,25 @@
 <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
     <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
 
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">num</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
     <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
-
     <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
       </p>
 <a name="boost_local.Tutorial.binding.constant_binding"></a><h6>
-<a name="id867555"></a>
+<a name="id868521"></a>
         <a class="link" href="Tutorial.html#boost_local.Tutorial.binding.constant_binding">Constant Binding</a>
       </h6>
 <p>
         Constant binding allows to bind variables in scope by constant reference
         or constant value (constant binding 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). <sup>[<a name="id867580" href="#ftn.id867580" class="footnote">9</a>]</sup>
+ lambda</a> functions). <sup>[<a name="id868545" href="#ftn.id868545" class="footnote">9</a>]</sup>
       </p>
 <p>
         The parenthesized syntax uses the "keywords" <code class="computeroutput"><span class="keyword">const</span>
@@ -501,22 +495,20 @@
     <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
     <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
 
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
         <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
     <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
-
     <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
       </p>
 <a name="boost_local.Tutorial.binding.binding_the_object__code__phrase_role__keyword__this__phrase___code_"></a><h6>
-<a name="id868895"></a>
+<a name="id869810"></a>
         <a class="link" href="Tutorial.html#boost_local.Tutorial.binding.binding_the_object__code__phrase_role__keyword__this__phrase___code_">Binding
         the Object <code class="computeroutput"><span class="keyword">this</span></code></a>
       </h6>
@@ -565,10 +557,10 @@
           to a local function, the local function <span class="bold"><strong>body must
           use the special symbol</strong></span> <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="id869250" href="#ftn.id869250" class="footnote">10</a>]</sup> Using <code class="computeroutput"><span class="keyword">this</span></code> within
+ the bound object. <sup>[<a name="id870165" href="#ftn.id870165" class="footnote">10</a>]</sup> Using <code class="computeroutput"><span class="keyword">this</span></code> within
           the local function body will generate a compile-time error so programmers
           cannot mistakenly confuse the use of <code class="computeroutput"><span class="identifier">this_</span></code>
- with <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id869349" href="#ftn.id869349" class="footnote">11</a>]</sup>
+ with <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id870268" href="#ftn.id870268" class="footnote">11</a>]</sup>
         </p></td></tr>
 </table></div>
 <p>
@@ -591,13 +583,11 @@
     <span class="identifier">adder</span><span class="special">():</span> <span class="identifier">sum_</span><span class="special">(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">{}</span>
 
     <span class="keyword">double</span> <span class="identifier">sum</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;&amp;</span> <span class="identifier">nums</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">)</span> <span class="special">{</span>
-
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="keyword">this</span><span class="special">))</span> <span class="special">)</span>
- <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="keyword">this</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
             <span class="identifier">this_</span><span class="special">-&gt;</span><span class="identifier">sum_</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span> <span class="comment">// Use `this_` instead of `this`.
 </span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">this_</span><span class="special">-&gt;</span><span class="identifier">sum_</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">nums</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">add</span><span class="special">);</span>
         <span class="keyword">return</span> <span class="identifier">sum_</span><span class="special">;</span>
@@ -632,9 +622,9 @@
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
 </span> <span class="special">...</span>
 
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
+ <code class="computeroutput">BOOST_LOCAL_BLOCK</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
         <span class="emphasis"><em>block-body</em></span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></code>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_BLOCK_END</code>
 
     <span class="special">...</span>
 <span class="special">}</span>
@@ -681,7 +671,7 @@
           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 <span class="bold"><strong>it does not return the enclosing scope</strong></span>.
- <sup>[<a name="id870874" href="#ftn.id870874" class="footnote">12</a>]</sup>
+ <sup>[<a name="id871709" href="#ftn.id871709" class="footnote">12</a>]</sup>
         </p></td></tr>
 </table></div>
 <p>
@@ -723,9 +713,9 @@
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
 </span> <span class="special">...</span>
 
- <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
+ <code class="computeroutput">BOOST_LOCAL_EXIT</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
         <span class="emphasis"><em>exit-body</em></span>
- <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></code>
+ <span class="special">}</span> <code class="computeroutput">BOOST_LOCAL_EXIT_END</code>
 
     <span class="special">...</span>
 <span class="special">}</span>
@@ -782,7 +772,7 @@
 <p>
         Local exits are very similar to the functionality already provided by Boost.ScopeExit
         with the addition that they also support constant binding and the binding
- of the object <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id872167" href="#ftn.id872167" class="footnote">13</a>]</sup>
+ of the object <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id872989" href="#ftn.id872989" class="footnote">13</a>]</sup>
       </p>
 </div>
 <div class="section">
@@ -793,11 +783,11 @@
         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="id872518" href="#ftn.id872518" class="footnote">14</a>]</sup>
+ the Reference section): <sup>[<a name="id873317" href="#ftn.id873317" class="footnote">14</a>]</sup>
       </p>
-<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</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>parenthesized-binding</em></span> <span class="special">)</span>
-<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<pre class="programlisting"><code class="computeroutput">BOOST_LOCAL_FUNCTION_TPL</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</em></span> <span class="special">)</span>
+<code class="computeroutput">BOOST_LOCAL_BLOCK_TPL</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<code class="computeroutput">BOOST_LOCAL_EXIT_TPL</code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
 </pre>
 <p>
         These macros have the exact same API as their equivalents without the <code class="computeroutput"><span class="identifier">TPL</span></code> postfix that we have seen so far. The
@@ -856,7 +846,7 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.id864328" href="#id864328" class="para">2</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id865394" href="#id865394" class="para">2</a>] </sup>
             The parenthesized syntax owes its name to the indeed large number of
             parenthesis <code class="computeroutput"><span class="special">()</span></code> that are
             required to wrap its elements. Programmers might notice some similarities
@@ -867,17 +857,17 @@
             sequences and Boost.Preprocessor
             sequences are formed by wrapping tokens within round parenthesis <code class="computeroutput"><span class="special">()</span></code>.
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id864455" href="#id864455" class="para">3</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id865521" href="#id865521" class="para">3</a>] </sup>
             <span class="bold"><strong>Rationale.</strong></span> This constraint comes form
             the fact that the C++ preprocessor can only concatenate <code class="literal">##</code>
             alphanumeric symbols.
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id864491" href="#id864491" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id865557" href="#id865557" class="para">4</a>] </sup>
             <span class="bold"><strong>Rationale.</strong></span> This constraint comes from
             the fact that the ISO C++ standard preprocessor forbids empty macro parameters
             (this is different for C99 and other more recent preprocessors).
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id865437" href="#id865437" class="para">5</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id866504" href="#id866504" class="para">5</a>] </sup>
             While there are fundamental limitations to the amount of parenthesized
             syntax error checking that can be done using the preprocessor (e.g.,
             there is no way to gracefully detect and report a missing parenthesis
@@ -888,26 +878,26 @@
             messages they experience because of parenthesized syntax errors so to
             help this development effort.
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id865969" href="#id865969" class="para">6</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id867024" href="#id867024" class="para">6</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
               have the same value and would no longer be useful to pinpoint the error.
             </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id866003" href="#id866003" class="para">7</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id867054" href="#id867054" class="para">7</a>] </sup>
               <span class="bold"><strong>Rationale.</strong></span> The local function name
- must be passed to the ending macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ must be passed to the ending macro <code class="computeroutput">BOOST_LOCAL_FUNCTION_END</code>
               so this macro can declare a local variable with the local function
               name to hold the local functor object. At the same time, the local
- function name must also be passed to the declaration macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ function name must also be passed to the declaration macro <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>
               to allow the local function to recursively call itself. The local function
               declaration and ending macros are kept as two separate macros so that
               the local function body does not have to be passed as a macro parameter
               (otherwise, the compiler error line numbers will all appear on the
               same line and they will no longer be useful to pinpoint the errors).
             </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id866621" href="#id866621" class="para">8</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id867618" href="#id867618" class="para">8</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,
@@ -920,7 +910,7 @@
           This is especially useful for maintenance so 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.id867580" href="#id867580" class="para">9</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id868545" href="#id868545" class="para">9</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 some correctness
@@ -928,14 +918,14 @@
           variables they were using (see the Contract++
           library). This was achieved by binding by constant reference the variables
           needed by the assertions and then by programming the local function body
- to check the assertions (or more conveniently by using <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>). This way
+ to check the assertions (or more conveniently by using <code class="computeroutput">BOOST_LOCAL_BLOCK</code>). This way
           if any of the assertions mistakenly changes a bound variable (for example
           confusing the operator <code class="computeroutput"><span class="special">==</span></code>
           with <code class="computeroutput"><span class="special">=</span></code>), the compiler 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.id869250" href="#id869250" class="para">10</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id870165" href="#id870165" class="para">10</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
@@ -949,11 +939,11 @@
             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.id869349" href="#id869349" class="para">11</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id870268" href="#id870268" class="para">11</a>] </sup>
             <span class="bold"><strong>Rationale.</strong></span> This is because the body
             function is implemented as static function of the local functor class.
           </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id870874" href="#id870874" class="para">12</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id871709" href="#id871709" class="para">12</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),
@@ -971,11 +961,11 @@
             <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.id872167" href="#id872167" class="para">13</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id872989" href="#id872989" class="para">13</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"
- in computer programming). This would be justified by the fact that <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code> simply extends
+ in computer programming). This would be justified by the fact that <code class="computeroutput">BOOST_LOCAL_EXIT</code> simply extends
           the functionality already provided by <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span></code>.
           The headers will be <code class="computeroutput"><span class="string">"boost/scope/function.hpp"</span></code>,
           <code class="computeroutput"><span class="string">"boost/scope/block.hpp"</span></code>,
@@ -998,7 +988,7 @@
           local functions are not known under the name of "scope functions"
           (they are indeed known by the name of "local functions" or "nested functions").
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.id872518" href="#id872518" class="para">14</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.id873317" href="#id873317" class="para">14</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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -27,7 +27,7 @@
 </h3></div></div></div>
 <div><p class="copyright">Copyright &#169; 2009 -2011 Lorenzo Caminiti</p></div>
 <div><div class="legalnotice">
-<a name="id809057"></a><p>
+<a name="id807671"></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>
@@ -113,7 +113,7 @@
         </li>
 </ul></div>
 <a name="boost_local.Introduction.an_example"></a><h6>
-<a name="id809432"></a>
+<a name="id808985"></a>
       <a class="link" href="index.html#boost_local.Introduction.an_example">An Example</a>
     </h6>
 <p>
@@ -137,13 +137,82 @@
           mistakenly changing any of the variables in scope).
         </li>
 </ul></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Notes
+ </p>
+ </th>
+<th>
+ <p>
+ Variadic Macro Syntax (C99 and later compilers)
+ </p>
+ </th>
+<th>
+ <p>
+ Sequencing Macro Syntax (all C++ compilers)
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="number">1.</span>
+
+
+
+
+
+
+
+
+
+
+
+ <span class="number">2.</span>
+ <span class="number">3.</span>
+ <span class="number">4.</span>
+
+ <span class="number">5.</span>
+ <span class="number">6.</span>
+
+
+
+ <span class="number">7.</span>
+ <span class="number">8.</span>
+
+ <span class="number">9.</span>
+
+
+<span class="number">10.</span>
+
+<span class="number">11.</span>
+<span class="number">12.</span>
+
+<span class="number">13.</span>
+
+
+
+</pre>
 <p>
-
+ </p>
+ </td>
+<td>
+ <p>
+
 </p>
-<pre class="programlisting"><a class="co" name="boost_local0co" href="index.html#boost_local0"><img src="../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a>
-<span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
@@ -152,134 +221,158 @@
     <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
     <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
 
- <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <a class="co" name="boost_local1co" href="index.html#boost_local1"><img src="../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a>
- <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <a class="co" name="boost_local2co" href="index.html#boost_local2"><img src="../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <a class="co" name="boost_local3co" href="index.html#boost_local3"><img src="../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a> <spa
n class="special">)</span>
- <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local4co" href="index.html#boost_local4"><img src="../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
         <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span> <a class="co" name="boost_local5co" href="index.html#boost_local5"><img src="../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a>
- <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span> <a class="co" name="boost_local6co" href="index.html#boost_local6"><img src="../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
 
     <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
     <span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
- <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">size</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">nums</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local7co" href="index.html#boost_local7"><img src="../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span> <a class="co" name="boost_local8co" href="index.html#boost_local8"><img src="../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a>
+ <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Freed array: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">nums</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span> <a class="co" name="boost_local9co" href="index.html#boost_local9"><img src="../../../../doc/src/images/callouts/10.png" alt="10" border="0"></a>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
 
     <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <a class="co" name="boost_local10co" href="index.html#boost_local10"><img src="../../../../doc/src/images/callouts/11.png" alt="11" border="0"></a>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// `add` as template parameter
+</span>
+ <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// so far `sum` is 10*100+10*90.5+10*7=1975
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Asserted summation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
 
- <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local11co" href="index.html#boost_local11"><img src="../../../../doc/src/images/callouts/12.png" alt="12" border="0"></a>
- <span class="comment">// So far: sum = 10 * 100.0 + 10 * 90.5 + 10 * 7.0 = 1975.0
-</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <a class="co" name="boost_local12co" href="index.html#boost_local12"><img src="../../../../doc/src/images/callouts/13.png" alt="13" border="0"></a>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Asserted summation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span> <a class="co" name="boost_local13co" href="index.html#boost_local13"><img src="../../../../doc/src/images/callouts/14.png" alt="14" border="0"></a>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span> <span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">size</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">nums</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Freed array: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">nums</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// `add` as template parameter
+</span>
+ <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// so far `sum` is 10*100+10*90.5+10*7=1975
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Asserted summation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
     
     <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<p>
+ Where the notes refer to the following comments:
     </p>
-<div class="calloutlist"><table border="0" summary="Callout list">
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local0"></a>1 </p></td>
-<td valign="top" align="left"><p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
           Include the header files for this library local functions, local blocks,
           and local exits.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local1"></a>2 </p></td>
-<td valign="top" align="left"><p>
- The <span class="bold"><strong>local function</strong></span> declaration macro.
- This macro takes one parameter specifying the local function signature
- using the <span class="emphasis"><em>parenthesized syntax</em></span>. This syntax resembles
- the usual C++ function declaration syntax but it wraps all tokens within
- parenthesis (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
- section). The parenthesized syntax for local functions introduces the new
- "keyword" <code class="computeroutput"><span class="identifier">bind</span></code>
- which is used in place of a parameter type to indicate that the following
- sequence of parameters bind to variables in scope.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local2"></a>3 </p></td>
-<td valign="top" align="left"><p>
- 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.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local3"></a>4 </p></td>
-<td valign="top" align="left"><p>
- The variable <code class="computeroutput"><span class="identifier">sum</span></code> is instead
- bound by non-constant reference because the local function needs to change
- its value to report the summation result to the enclosing scope.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local4"></a>5 </p></td>
-<td valign="top" align="left"><p>
- The local function body is programmed using the usual C++ syntax.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local5"></a>6 </p></td>
-<td valign="top" align="left"><p>
- The macro ending the local function definition (note how the local function
- name needs to be repeated here).
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local6"></a>7 </p></td>
-<td valign="top" align="left"><p>
+ </li>
+<li class="listitem">
+ The <span class="bold"><strong>local function</strong></span> parameter macro takes
+ a Boost.Preprocessor
+ sequence of tokens listing each parameter type and name wrapped within
+ 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 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
+ that wrapped within parenthesis <code class="literal"><span class="emphasis"><em>parameter-type parameter-name</em></span>,<span class="emphasis"><em>...</em></span></code>
+ so to provide a syntax more similar to the normal C++ syntax for function
+ parameter lists. The local function result type is specified just before
+ the parameter macro.
+ </li>
+<li class="listitem">
+ This library macros introduce the special "keyword" <code class="computeroutput"><span class="identifier">bind</span></code> which can be used instead of the
+ parameter type to bind variables in scope. Variables can be bound by value,
+ reference, constant value, and constant reference plus the object <code class="computeroutput"><span class="keyword">this</span></code> can be bound from within a non-static
+ member function scope (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>
+ is instead bound by non-constant reference because the local function needs
+ to change its value to report the summation result to the enclosing scope.
+ </li>
+<li class="listitem">
+ The local function body is programmed outside the macros and using normal
+ C++ syntax. Eventual compiler error messages and line numbers retain their
+ usual meaning. Exceptions specifications can be programmed outside the
+ macro and just before the body code block <code class="computeroutput"><span class="special">{...}</span></code>
+ as usual (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
+ section).
+ </li>
+<li class="listitem">
+ The macro ending the local function definition specifies the local function
+ name.
+ </li>
+<li class="listitem">
           The local function macros declare a functor object local to the enclosing
- scope named <code class="computeroutput"><span class="identifier">add</span></code>. As indicated
- by the local function parenthesized signature, the functor <code class="computeroutput"><span class="identifier">add</span></code> has <code class="computeroutput"><span class="keyword">void</span></code>
+ scope named <code class="computeroutput"><span class="identifier">add</span></code>. The functor
+ <code class="computeroutput"><span class="identifier">add</span></code> has <code class="computeroutput"><span class="keyword">void</span></code>
           result type, it can be called by specifying one parameter of type <code class="computeroutput"><span class="keyword">double</span></code>, and it has access to the variables
- in scope <code class="computeroutput"><span class="identifier">factor</span></code> and <code class="computeroutput"><span class="identifier">sum</span></code>.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local7"></a>8 </p></td>
-<td valign="top" align="left"><p>
+ in scope <code class="computeroutput"><span class="identifier">factor</span></code> (by constant
+ value) and <code class="computeroutput"><span class="identifier">sum</span></code> (by reference).
+ </li>
+<li class="listitem">
           The <span class="bold"><strong>local exit</strong></span> declaration macro only
- specifies the variables in scope to bind (eventually as constants).
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local8"></a>9 </p></td>
-<td valign="top" align="left"><p>
+ specifies the variables in scope to bind (by reference or value and eventually
+ as constants). Exceptions specifications can be programmed outside the
+ macro and just before the body code block <code class="computeroutput"><span class="special">{...}</span></code>
+ as usual (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
+ section).
+ </li>
+<li class="listitem">
           The local exit code will be automatically executed when the enclosing scope
           is exited.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local9"></a>10 </p></td>
-<td valign="top" align="left"><p>
- A local exit is anonymous so its ending macro takes no argument.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local10"></a>11 </p></td>
-<td valign="top" align="left"><p>
+ </li>
+<li class="listitem">
+ Local exits are anonymous so their ending macro takes no argument.
+ </li>
+<li class="listitem">
           The local function <code class="computeroutput"><span class="identifier">add</span></code>
- can also be passed as a template parameter to the STL <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
- algorithm.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local11"></a>12 </p></td>
-<td valign="top" align="left"><p>
+ can also be passed as a template parameter (for example, to the STL <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code> algorithm).
+ </li>
+<li class="listitem">
           The <span class="bold"><strong>local block</strong></span> declaration macro only
- specifies the variables in scope to bind (eventually as constants).
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local12"></a>13 </p></td>
-<td valign="top" align="left"><p>
+ specifies the variables in scope to bind (by reference or value and eventually
+ as constants).
+ </li>
+<li class="listitem">
           The local block code is executed "in place" where it is programmed
           like a usual C++ block of code <code class="computeroutput"><span class="special">{</span>
           <span class="special">...</span> <span class="special">}</span></code>.
@@ -288,19 +381,15 @@
           instead of the equality operator <code class="computeroutput"><span class="special">==</span></code>
           because the variable <code class="computeroutput"><span class="identifier">sum</span></code>
           is bound by constant reference so it cannot be modified.
- </p></td>
-</tr>
-<tr>
-<td width="5%" valign="top" align="left"><p><a name="boost_local13"></a>14 </p></td>
-<td valign="top" align="left"><p>
- A local block is anonymous so its ending macro takes no argument.
- </p></td>
-</tr>
-</table></div>
+ </li>
+<li class="listitem">
+ Local blocks are anonymous so their ending macro takes no argument.
+ </li>
+</ol></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: February 10, 2011 at 15:15:01 GMT</small></p></td>
+<td align="left"><p><small>Last revised: February 22, 2011 at 22:21:50 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/local/libs/local/doc/html/reference.html
==============================================================================
--- sandbox/local/libs/local/doc/html/reference.html (original)
+++ sandbox/local/libs/local/doc/html/reference.html 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Boost.Local 0.1.1">
 <link rel="up" href="index.html" title="Boost.Local 0.1.1">
 <link rel="prev" href="boost_local/Advanced.html" title="Advanced">
-<link rel="next" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">
+<link rel="next" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,31 +20,18 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="boost_local/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_BLOCK.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="boost_local/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="reference"></a>Reference</h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section">Header <boost/local/block.hpp></span></dt>
 <dt><span class="section">Header <boost/local/config.hpp></span></dt>
-<dt><span class="section">Header <boost/local/exit.hpp></span></dt>
 <dt><span class="section">Header <boost/local/function.hpp></span></dt>
-<dt><span class="section">Header <boost/local/function_ref.hpp></span></dt>
 <dt><span class="section">Header <boost/utility/identity.hpp></span></dt>
 </dl></div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="header.boost.local.block_hpp"></a>Header &lt;boost/local/block.hpp&gt;</h3></div></div></div>
-<p>Local blocks allow to program code that is executed accessing some of the variables in scope as constants. </p>
-<pre class="synopsis">
-
-<a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a>(parenthesized_binding)
-<a class="link" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a>(parenthesized_binding)
-<a class="link" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
 <a name="header.boost.local.config_hpp"></a>Header &lt;boost/local/config.hpp&gt;</h3></div></div></div>
 <p>Configuration macros allow to change the behaviour of this library at compile-time. </p>
 <pre class="synopsis">
@@ -54,32 +41,16 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="header.boost.local.exit_hpp"></a>Header &lt;boost/local/exit.hpp&gt;</h3></div></div></div>
-<p>Local exits allow to program code that is executed when the enclosing scope is exited. </p>
-<pre class="synopsis">
-
-<a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a>(parenthesized_binding)
-<a class="link" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a>(parenthesized_binding)
-<a class="link" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
 <a name="header.boost.local.function_hpp"></a>Header &lt;boost/local/function.hpp&gt;</h3></div></div></div>
-<p>Local functions allow to program functions locally within the scope where they are needed. </p>
+<p>Local function references can be passed as function and template parameters, they can be assigned to variables, etc. </p>
 <pre class="synopsis">
 
-<a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a>(parenthesized_signature)
-<a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a>(parenthesized_signature)
-<a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a>(local_function_name)
-<a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a>(new_local_function_name)</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="header.boost.local.function_ref_hpp"></a>Header &lt;boost/local/function_ref.hpp&gt;</h3></div></div></div>
-<p>Local function references can be passed as function and template parameters, they can be assigned to variables, etc. </p>
+<a class="link" href="BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">BOOST_LOCAL_FUNCTION_PARAMS</a>(...)
+<a class="link" href="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL">BOOST_LOCAL_FUNCTION_PARAMS_TPL</a>(...)
+<a class="link" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a>(name)</pre>
 <pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
   <span class="keyword">namespace</span> <span class="identifier">local</span> <span class="special">{</span>
- <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> F<span class="special">,</span> <span class="identifier">size_t</span> defaults <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="boost/local/function_ref.html" title="Struct template function_ref">function_ref</a><span class="special">;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> F<span class="special">,</span> <span class="identifier">size_t</span> defaults <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="boost/local/function.html" title="Struct template function">function</a><span class="special">;</span>
   <span class="special">}</span>
 <span class="special">}</span></pre>
 </div>
@@ -104,7 +75,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="boost_local/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_BLOCK.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="boost_local/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/local/libs/local/doc/html/standalone_HTML.manifest
==============================================================================
--- sandbox/local/libs/local/doc/html/standalone_HTML.manifest (original)
+++ sandbox/local/libs/local/doc/html/standalone_HTML.manifest 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -3,19 +3,12 @@
 boost_local/Tutorial.html
 boost_local/Advanced.html
 reference.html
-BOOST_LOCAL_BLOCK.html
-BOOST_LOCAL_BLOCK_TPL.html
-BOOST_LOCAL_BLOCK_END.html
 BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html
 BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html
-BOOST_LOCAL_EXIT.html
-BOOST_LOCAL_EXIT_TPL.html
-BOOST_LOCAL_EXIT_END.html
-BOOST_LOCAL_FUNCTION.html
-BOOST_LOCAL_FUNCTION_TPL.html
-BOOST_LOCAL_FUNCTION_END.html
-BOOST_LOCAL_FUNCTION_END_RENAME.html
-boost/local/function_ref.html
+boost/local/function.html
+BOOST_LOCAL_FUNCTION_PARAMS.html
+BOOST_LOCAL_FUNCTION_PARAMS_TPL.html
+BOOST_LOCAL_FUNCTION_NAME.html
 BOOST_IDENTITY_TYPE.html
 BOOST_IDENTITY_VALUE.html
 boost_local/Grammar.html

Modified: sandbox/local/libs/local/doc/jamfile.jam
==============================================================================
--- sandbox/local/libs/local/doc/jamfile.jam (original)
+++ sandbox/local/libs/local/doc/jamfile.jam 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -11,9 +11,9 @@
 doxygen reference
     :
         ../../../boost/local/function.hpp
- ../../../boost/local/block.hpp
- ../../../boost/local/exit.hpp
- ../../../boost/local/function_ref.hpp
+ #../../../boost/local/block.hpp
+ #../../../boost/local/exit.hpp
+ ../../../boost/local/function.hpp
         ../../../boost/local/config.hpp
         ../../../boost/utility/identity.hpp
     :

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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -34,7 +34,35 @@
 * A local exit is used to automatically release the array's memory at scope exit.
 * A local block is used to assert the correct final value of the summation in a constant-correct context (therefore preventing the assertion from mistakenly changing any of the variables in scope).
 
-[add_cpp]
+[table
+[ [Notes] [Variadic Macro Syntax (C99 and later compilers)] [Sequencing Macro Syntax (all C++ compilers)] ]
+[ [ [add_line_numbers_cpp] ] [ [add_va_cpp] ] [ [add_cpp] ] ]
+]
+
+Where the notes refer to the following comments:
+
+# 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 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 that wrapped within parenthesis [^['parameter-type parameter-name],['...]] so to provide a syntax more similar to the normal C++ syntax for function parameter lists.
+The local function result type is specified just before the parameter macro.
+# This 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, reference, constant value, and constant reference plus the object `this` can be bound from within a non-static member function scope (see the __Tutorial__ section).
+For example, the variable `factor` is bound by constant value so it cannot be mistakenly modified by the local function body.
+The variable `sum` is instead bound by non-constant reference because the local function needs to change its value to report the summation result to the enclosing scope.
+# The local function body is programmed outside the macros and using normal C++ syntax.
+Eventual compiler error messages and line numbers retain their usual meaning.
+Exceptions specifications can be programmed outside the macro and just before the body code block `{...}` as usual (see the __Tutorial__ section).
+# The macro ending the local function definition specifies the local function name.
+# The local function macros declare a functor object local to the enclosing scope named `add`. The functor `add` has `void` result type, it can be called by specifying one parameter of type `double`, and it has access to the variables in scope `factor` (by constant value) and `sum` (by reference).
+# The *local exit* declaration macro only specifies the variables in scope to bind (by reference or value and eventually as constants).
+Exceptions specifications can be programmed outside the macro and just before the body code block `{...}` as usual (see the __Tutorial__ section).
+# The local exit code will be automatically executed when the enclosing scope is exited.
+# Local exits are anonymous so their ending macro takes no argument.
+# The local function `add` can also be passed as a template parameter (for example, to the STL `std::for_each` algorithm).
+# The *local block* declaration macro only specifies the variables in scope to bind (by reference or value and eventually as constants).
+# The local block code is executed "in place" where it is programmed like a usual C++ block of code `{ ... }`.
+In this example, the compiler will correctly generate an error if the assignment operator `=` is mistakenly used instead of the equality operator `==` because the variable `sum` is bound by constant reference so it cannot be modified.
+# Local blocks are anonymous so their ending macro takes no argument.
 
 [endsect]
 

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-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -66,7 +66,9 @@
 [def __BOOST_IDENTITY_VALUE__ [macroref BOOST_IDENTITY_VALUE]]
 [def __function_ref__ [classref boost::local::function_ref function_ref]]
 
+[import ../../example/add_line_numbers.cpp]
 [import ../../example/add.cpp]
+[import ../../example/add_va.cpp]
 [import ../../example/add_num.cpp]
 [import ../../example/add_num_sum.cpp]
 [import ../../example/add_num_factor_sum.cpp]

Modified: sandbox/local/libs/local/example/add.cpp
==============================================================================
--- sandbox/local/libs/local/example/add.cpp (original)
+++ sandbox/local/libs/local/example/add.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -19,10 +19,10 @@
 // function body.
 
 //[ add_cpp
-/*< Include the header files for this library local functions, local blocks, and local exits. >*/
 #include <boost/local/function.hpp>
 #include <boost/local/block.hpp>
 #include <boost/local/exit.hpp>
+
 #include <algorithm>
 #include <iostream>
 #include <cassert>
@@ -31,29 +31,27 @@
     double sum = 0.0;
     int factor = 10;
 
- BOOST_LOCAL_FUNCTION( /*< The *local function* declaration macro. This macro takes one parameter specifying the local function signature using the /parenthesized syntax/. This syntax resembles the usual C++ function declaration syntax but it wraps all tokens within parenthesis (see the __Tutorial__ section). The parenthesized syntax for local functions introduces the new "keyword" `bind` which is used in place of a parameter type to indicate that the following sequence of parameters bind to variables in scope. >*/
- (void) (add)( (double)(num) (const bind)((factor)) /*< The variable `factor` is bound by constant value so it cannot be mistakenly modified by the local function body. >*/ (bind)((&sum)) /*< The variable `sum` is instead bound by non-constant reference because the local function needs to change its value to report the summation result to the enclosing scope. >*/ )
- ) { /*< The local function body is programmed using the usual C++ syntax. >*/
+ void BOOST_LOCAL_FUNCTION_PARAMS( (double num)
+ (const bind factor) (bind& sum) ) {
         sum += factor * num;
         std::clog << "Summed: " << sum << std::endl;
- } BOOST_LOCAL_FUNCTION_END(add) /*< The macro ending the local function definition (note how the local function name needs to be repeated here). >*/
- add(100.0); /*< The local function macros declare a functor object local to the enclosing scope named `add`. As indicated by the local function parenthesized signature, the functor `add` has `void` result type, it can be called by specifying one parameter of type `double`, and it has access to the variables in scope `factor` and `sum`. >*/
+ } BOOST_LOCAL_FUNCTION_NAME(add)
+ add(100.0);
 
     size_t size = 2;
     double* nums = new double[size];
- BOOST_LOCAL_EXIT( (const bind)((&size)) (bind)((nums)) ) { /*< The *local exit* declaration macro only specifies the variables in scope to bind (eventually as constants). >*/
- if (size && nums) delete[] nums; /*< The local exit code will be automatically executed when the enclosing scope is exited. >*/
+ BOOST_LOCAL_EXIT( (const bind& size) (bind nums) ) {
+ if (size && nums) delete[] nums;
         std::clog << "Freed array: " << nums << std::endl;
- } BOOST_LOCAL_EXIT_END /*< A local exit is anonymous so its ending macro takes no argument. >*/
+ } BOOST_LOCAL_EXIT_END
 
     nums[0] = 90.5; nums[1] = 7.0;
- std::for_each(nums, nums + size, add); /*< The local function `add` can also be passed as a template parameter to the STL `std::for_each` algorithm. >*/
+ std::for_each(nums, nums + size, add); // `add` as template parameter
 
- BOOST_LOCAL_BLOCK( (const bind)((&sum)) ) { /*< The *local block* declaration macro only specifies the variables in scope to bind (eventually as constants). >*/
- // So far: sum = 10 * 100.0 + 10 * 90.5 + 10 * 7.0 = 1975.0
- assert(sum == 1975.0); /*< The local block code is executed "in place" where it is programmed like a usual C++ block of code `{ ... }`. In this example, the compiler will correctly generate an error if the assignment operator `=` is mistakenly used instead of the equality operator `==` because the variable `sum` is bound by constant reference so it cannot be modified. >*/
+ BOOST_LOCAL_BLOCK( (const bind& sum) ) {
+ assert(sum == 1975.0); // so far `sum` is 10*100+10*90.5+10*7=1975
         std::clog << "Asserted summation: " << sum << std::endl;
- } BOOST_LOCAL_BLOCK_END /*< A local block is anonymous so its ending macro takes no argument. >*/
+ } BOOST_LOCAL_BLOCK_END
     
     return 0;
 }

Modified: sandbox/local/libs/local/example/add_num.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_num.cpp (original)
+++ sandbox/local/libs/local/example/add_num.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -5,21 +5,18 @@
 // (see accompanying file LICENSE_1_0.txt or a copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-// Simple parenthesized syntax example used by the documentation.
+// Simple example used by the documentation.
 
 //[ add_num_cpp
 #include <boost/local/function.hpp>
 #include <iostream>
 
 int main() {
- BOOST_LOCAL_FUNCTION(
- (void) (add)( (double)(num) )
- ) {
+ void BOOST_LOCAL_FUNCTION_PARAMS( (double num) ) {
         std::clog << num << std::endl;
- } BOOST_LOCAL_FUNCTION_END(add)
+ } BOOST_LOCAL_FUNCTION_NAME(add)
 
     add(100.0);
-
     return 0;
 }
 //]

Modified: sandbox/local/libs/local/example/add_num_sum.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_num_sum.cpp (original)
+++ sandbox/local/libs/local/example/add_num_sum.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -14,15 +14,12 @@
 int main() {
     double sum = 0.0;
 
- BOOST_LOCAL_FUNCTION(
- (void) (add)( (double)(num) (bind)((&sum)) )
- ) {
+ void BOOST_LOCAL_FUNCTION_PARAMS( (double num) (bind& sum) ) {
         sum += num;
         std::clog << "Summed: " << sum << std::endl;
- } BOOST_LOCAL_FUNCTION_END(add)
+ } BOOST_LOCAL_FUNCTION_NAME(add)
 
     add(100.0);
-
     return 0;
 }
 //]

Modified: sandbox/local/libs/local/example/add_optimizers.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_optimizers.cpp (original)
+++ sandbox/local/libs/local/example/add_optimizers.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -5,21 +5,16 @@
 // (see accompanying file LICENSE_1_0.txt or a copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 
-// Show how to use some optimizations (inlining, auto, register, etc).
+// Show how to use some optimizations (auto, register, etc).
 
 //[add_optimizers_cpp
 #include <boost/local/function.hpp>
 #include <iostream>
 
 int main() {
- BOOST_LOCAL_FUNCTION(
- (inline) (int) (add)( // Inlined local function.
- (auto)(int)(x) // Auto parameter.
- (register)(int)(y) // Register parameter.
- )
- ) {
+ int BOOST_LOCAL_FUNCTION_PARAMS( (auto int x) (register int y) ) {
         return x + y;
- } BOOST_LOCAL_FUNCTION_END(add)
+ } BOOST_LOCAL_FUNCTION_NAME(add)
 
     std::cout << add(3, 5) << std::endl;
 

Modified: sandbox/local/libs/local/example/add_this.cpp
==============================================================================
--- sandbox/local/libs/local/example/add_this.cpp (original)
+++ sandbox/local/libs/local/example/add_this.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -19,13 +19,11 @@
     adder(): sum_(0.0) {}
 
     double sum(const std::vector<double>& nums, const int& factor = 10) {
-
- BOOST_LOCAL_FUNCTION(
- (void) (add)( (double)(num) (const bind)((factor)) (bind)((this)) )
- ) {
+ void BOOST_LOCAL_FUNCTION_PARAMS( (double num) (const bind factor)
+ (bind this) ) {
             this_->sum_ += factor * num; // Use `this_` instead of `this`.
             std::clog << "Summed: " << this_->sum_ << std::endl;
- } BOOST_LOCAL_FUNCTION_END(add)
+ } BOOST_LOCAL_FUNCTION_NAME(add)
 
         std::for_each(nums.begin(), nums.end(), add);
         return sum_;

Modified: sandbox/local/libs/local/example/block.cpp
==============================================================================
--- sandbox/local/libs/local/example/block.cpp (original)
+++ sandbox/local/libs/local/example/block.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -15,7 +15,7 @@
 
     void f(int& x) { // Non-const member function so `this` is not const.
         // Non-const `this` but const `x`.
- BOOST_LOCAL_BLOCK( (const bind)((&x)) (bind)((this)) ) {
+ BOOST_LOCAL_BLOCK( (const bind& x) (bind this) ) {
             this_->x_ = x; // Non-const `this` cant be modified.
             assert(x == this_->x_); // Compiler error if `=` instead of `==`.
             

Modified: sandbox/local/libs/local/example/doit.cpp
==============================================================================
--- sandbox/local/libs/local/example/doit.cpp (original)
+++ sandbox/local/libs/local/example/doit.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -9,14 +9,13 @@
 // Adapted from C++0x lambda papaer N2529 (added default parameters).
 
 //[ doit_cpp
-#include <boost/local/function_ref.hpp>
 #include <boost/local/function.hpp>
 #include <boost/function.hpp>
 #include <iostream>
 
-// Using `function_ref` allows to use the same functor for all calls
-// (regardless of which set of default parameters is specified).
-void doit(boost::local::function_ref< int (int, int), 2 > l) {
+// Using `function` allows to use the same functor for all calls (regardless of
+// which set of default parameters is specified).
+void doit(boost::local::function< int (int, int), 2 > l) {
     std::cout << l(1, 2) << std::endl;
     std::cout << l(1) << std::endl;
     std::cout << l() << std::endl;
@@ -35,15 +34,13 @@
     {
         int i = 2;
     
- BOOST_LOCAL_FUNCTION(
- (int) (linear)( (int)(x)(default)(1) (int)(y)(default)(2)
- (bind)( (i) ) )
- ) {
+ int BOOST_LOCAL_FUNCTION_PARAMS( (int x)(default 1) (int y)(default 2)
+ (bind i) ) {
             return x + i * y;
- } BOOST_LOCAL_FUNCTION_END(linear)
+ } BOOST_LOCAL_FUNCTION_NAME(linear)
 
         // Assign local functions variables.
- boost::local::function_ref< int (int, int), 2 > l = linear;
+ boost::local::function< int (int, int), 2 > l = linear;
         l(1, 2); l(1); l(); // All calls because of default parameters.
         l2 = linear;
         l2(1, 2); // Only one call operation (without default parameters).

Modified: sandbox/local/libs/local/example/exit.cpp
==============================================================================
--- sandbox/local/libs/local/example/exit.cpp (original)
+++ sandbox/local/libs/local/example/exit.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -66,9 +66,7 @@
     person& p = persons_.back();
     person::evolution_t checkpoint = p.evolution_;
 
- BOOST_LOCAL_EXIT(
- (const bind)( (checkpoint) (&p) ) (bind)( (this) )
- ) {
+ BOOST_LOCAL_EXIT( (const bind checkpoint) (const bind& p) (bind this) ) {
         if (checkpoint == p.evolution_) this_->persons_.pop_back();
         std::cout << "1st local exit" << std::endl;
         return; // Exit local scope (not enclosing function).
@@ -82,9 +80,8 @@
     // Assign new id to the person.
     world::id_t const prev_id = p.id_;
     p.id_ = next_id_++;
- BOOST_LOCAL_EXIT(
- (const bind)( (checkpoint) (prev_id) ) (bind)( (&p) (&next_id_) )
- ) {
+ BOOST_LOCAL_EXIT( (const bind checkpoint) (const bind prev_id)
+ (bind& p) (bind& next_id_) ) {
         if (checkpoint == p.evolution_) {
             next_id_ = p.id_;
             p.id_ = prev_id;

Modified: sandbox/local/libs/local/example/find_if.cpp
==============================================================================
--- sandbox/local/libs/local/example/find_if.cpp (original)
+++ sandbox/local/libs/local/example/find_if.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -30,14 +30,10 @@
     double min_salary = 100000.00;
     double u_limit = 1.1 * min_salary;
 
- BOOST_LOCAL_FUNCTION(
- (bool) (between)(
- (const employee&)(e)
- (const bind)( (&min_salary) (&u_limit) )
- )
- ) {
+ bool BOOST_LOCAL_FUNCTION_PARAMS( (const employee& e)
+ (const bind& min_salary) (const bind& u_limit) ) {
         return e.salary() >= min_salary && e.salary() < u_limit;
- } BOOST_LOCAL_FUNCTION_END(between)
+ } BOOST_LOCAL_FUNCTION_NAME(between)
     
     // Pass local function to an STL algorithm as a template paramter (this
     // cannot be done with plain member funcitons of local classes).
@@ -45,7 +41,6 @@
             employees.begin(), employees.end(), between);
 
     if (i != employees.end()) { std::cout << i->salary() << std::endl; }
-
     return 0;
 }
 

Modified: sandbox/local/libs/local/example/print_map.cpp
==============================================================================
--- sandbox/local/libs/local/example/print_map.cpp (original)
+++ sandbox/local/libs/local/example/print_map.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -22,24 +22,20 @@
 typedef int const& sign_t;
 
 int main() {
- BOOST_LOCAL_FUNCTION(
- (void) (print)(
+ void BOOST_LOCAL_FUNCTION_NAME(
             // Identity macors handle commas.
- (BOOST_IDENTITY_TYPE((const std::map<std::string, size_t>&)))(m)
- (const size_t&)(factor)(default)
- (BOOST_IDENTITY_VALUE((key_size<std::string, size_t>::value)))
- (const std::string&)(separator)(default)(cat(":", " "))
+ (BOOST_IDENTITY_TYPE((const std::map<std::string, size_t>))& m)
+ (const size_t& factor)(default // Or just use `(default (...))`.
+ BOOST_IDENITY_VALUE((key_size<std::string, size_t>::value)))
+ (const std::string& separator)(default cat(":", " "))
             // Also, identity macors handle leading symbols.
- (BOOST_IDENTITY_TYPE((::sign_t)))(sign)(default)
- (BOOST_IDENTITY_VALUE((-1)))
- )
- ) {
+ (BOOST_IDENTITY_TYPE((::sign_t)) sign)(default -1) ) {
         for (std::map<std::string, size_t>::const_iterator i = m.begin();
                 i != m.end(); ++i) {
             std::cout << i->first << separator <<
                     sign * int(i->second) * int(factor) << std::endl;
         }
- } BOOST_LOCAL_FUNCTION_END(print)
+ } BOOST_LOCAL_FUNCTION_NAME(print)
 
     std::map<std::string, size_t> sizes;
     sizes["a"] = 1; sizes["ab"] = 2; sizes["abc"] = 3;

Deleted: sandbox/local/libs/local/example/same_line.cpp
==============================================================================
--- sandbox/local/libs/local/example/same_line.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
+++ (empty file)
@@ -1,21 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// 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).
-
-// Show that local functions can be defined on the same line of code.
-
-#include <boost/local/function.hpp>
-#include <iostream>
-
-int main() {
- BOOST_LOCAL_FUNCTION( (void) (l)( (int)(x) ) ) { std::cout << x << std::endl; } BOOST_LOCAL_FUNCTION_END(l) BOOST_LOCAL_FUNCTION( (void) (m)( (int)(x) ) ) { std::cout << x << std::endl; } BOOST_LOCAL_FUNCTION_END(m)
-
- l(1);
- m(2);
-
- return 0;
-}
-

Modified: sandbox/local/libs/local/example/transform.cpp
==============================================================================
--- sandbox/local/libs/local/example/transform.cpp (original)
+++ sandbox/local/libs/local/example/transform.cpp 2011-02-23 22:48:14 EST (Wed, 23 Feb 2011)
@@ -22,26 +22,19 @@
     w.resize(v.size());
 
     // w = ++v + 5 = 16 26 36 46 56
- BOOST_LOCAL_FUNCTION(
- (int) (inc)( (int)(i) (const bind)( (&offset) ) )
- ) {
+ int BOOST_LOCAL_FUNCTION_PARAMS( (int i) (const bind& offset) ) {
         // Compiler error if const `offset` modified here by mistake.
         return ++i + offset;
- } BOOST_LOCAL_FUNCTION_END(inc)
+ } BOOST_LOCAL_FUNCTION_NAME(inc)
     std::transform(v.begin(), v.end(), w.begin(), inc);
 
     offset = 0;
 
     // v = ++(v + w) + 0 = 27 47 67 87 107
- BOOST_LOCAL_FUNCTION(
- (int) (inc_sum)(
- (int)(i)
- (int)(j)
- (bind)( (inc) ) // Bind another local function.
- )
- ) {
+ int BOOST_LOCAL_FUNCTION_PARAMS( (int i) (int j)
+ (bind inc) ) { // Bind another local function.
         return inc(i + j); // Call the bound local function.
- } BOOST_LOCAL_FUNCTION_END(inc_sum)
+ } BOOST_LOCAL_FUNCTION_NAME(inc_sum)
     std::transform(v.begin(), v.end(), w.begin(), v.begin(), inc_sum);
 
     for (std::vector<int>::iterator i = v.begin(); i != v.end(); ++i)


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