Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77425 - in trunk/libs: local_function/doc local_function/doc/html local_function/doc/html/boost_localfunction local_function/example local_function/test scope_exit/doc scope_exit/doc/html scope_exit/doc/html/scope_exit scope_exit/test
From: lorcaminiti_at_[hidden]
Date: 2012-03-19 22:14:17


Author: lcaminiti
Date: 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
New Revision: 77425
URL: http://svn.boost.org/trac/boost/changeset/77425

Log:
Renamed cpp11 to cxx11 in LocalFunction.
Added _ID to ScopeExit and LocalFunction.
Added:
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_ID.html (contents, props changed)
   trunk/libs/local_function/example/gcc_lambda_cxx11.cpp
      - copied unchanged from r77421, /trunk/libs/local_function/example/gcc_lambda_cpp11.cpp
   trunk/libs/local_function/example/profile_gcc_cxx11_debug.png
      - copied unchanged from r77421, /trunk/libs/local_function/example/profile_gcc_cpp11_debug.png
   trunk/libs/local_function/example/profile_gcc_cxx11_release.png
      - copied unchanged from r77421, /trunk/libs/local_function/example/profile_gcc_cpp11_release.png
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html (contents, props changed)
Removed:
   trunk/libs/local_function/example/gcc_lambda_cpp11.cpp
   trunk/libs/local_function/example/profile_gcc_cpp11_debug.png
   trunk/libs/local_function/example/profile_gcc_cpp11_release.png
Text files modified:
   trunk/libs/local_function/doc/advanced_topics.qbk | 23 +++++
   trunk/libs/local_function/doc/alternatives.qbk | 4
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION.html | 2
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html | 2
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html | 2
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME.html | 8
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TPL.html | 8
   trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TYPEOF.html | 2
   trunk/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html | 113 +++++++++++++++++++++-----
   trunk/libs/local_function/doc/html/boost_localfunction/Alternatives.html | 14 +-
   trunk/libs/local_function/doc/html/boost_localfunction/Examples.html | 20 ++--
   trunk/libs/local_function/doc/html/boost_localfunction/Implementation.html | 16 +-
   trunk/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html | 169 ++-------------------------------------
   trunk/libs/local_function/doc/html/boost_localfunction/Tutorial.html | 11 +-
   trunk/libs/local_function/doc/html/index.html | 6
   trunk/libs/local_function/doc/html/reference.html | 1
   trunk/libs/local_function/doc/local_function.qbk | 2
   trunk/libs/local_function/example/Jamfile.v2 | 2
   trunk/libs/local_function/test/same_line.cpp | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html | 8
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html | 2
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html | 2
   trunk/libs/scope_exit/doc/html/index.html | 7
   trunk/libs/scope_exit/doc/html/reference.html | 2
   trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html | 6
   trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html | 106 +++++++++++++++++++++++-
   trunk/libs/scope_exit/doc/scope_exit.qbk | 26 +++++
   trunk/libs/scope_exit/test/same_line.cpp | 4
   32 files changed, 320 insertions(+), 258 deletions(-)

Modified: trunk/libs/local_function/doc/advanced_topics.qbk
==============================================================================
--- trunk/libs/local_function/doc/advanced_topics.qbk (original)
+++ trunk/libs/local_function/doc/advanced_topics.qbk 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -360,6 +360,29 @@
 
 [endsect]
 
+[section Same Line Expansions]
+
+In general, it is not possible to expand the [macroref BOOST_LOCAL_FUNCTION], [macroref BOOST_LOCAL_FUNCTION_TPL] macros multiple times on the same line.
+[footnote
+*Rationale.*
+The [macroref BOOST_LOCAL_FUNCTION] and [macroref BOOST_LOCAL_FUNCTION_TPL] macros internally use `__LINE__` to generate unique identifiers.
+Therefore, if the same macro is expanded more than on time on the same line, the generated identifiers will no longer be unique and the code will not compile.
+(This restriction does not apply to MSVC and other compilers that provide the non-standard `__COUNTER__` macro.)
+]
+
+Therefore, this library provides the additional macro [macroref BOOST_LOCAL_FUNCTION_ID] which can be expanded multiple times on the same line as long as programmers specify a unique identifier as the macro's first parameter.
+The unique identifier can be any token (not just numeric) that can be successfully concatenated by the preprocessor (e.g., `local_function_number_1_at_line_123`).
+The second parameter of [macroref BOOST_LOCAL_FUNCTION_ID] is `1` if the macro is used within a template (equivalent to [macroref BOOST_LOCAL_FUNCTION_TPL]), or `0` otherwise.
+Finally, [macroref BOOST_LOCAL_FUNCTION_ID] accept the local function parameter declaration list using the exact same syntax as [macroref BOOST_LOCAL_FUNCTION].
+
+For example (see also [@../../test/same_line.cpp =same_line.cpp=]):
+
+[same_line]
+
+As indicated by the example above, the [macroref BOOST_LOCAL_FUNCTION_ID] macro is especially useful when it is necessary to invoke it multiple times within a user-defined macro (because the preprocessor expands all nested macros on the same line).
+
+[endsect]
+
 [section Limitations (operators, etc)]
 
 The following table summarizes all C++ function features indicating those features that are not supported by this library for local functions.

Modified: trunk/libs/local_function/doc/alternatives.qbk
==============================================================================
--- trunk/libs/local_function/doc/alternatives.qbk (original)
+++ trunk/libs/local_function/doc/alternatives.qbk 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -226,11 +226,11 @@
     [ [GCC 4.5.3 With C++11 Lambdas and "Local Types as Template Parameters" ([^bjam cxxflags=-std=c++0x ...])] ]
     [ [
         [*Compiled with =bjam release ...= for maximum optimization (=-O3 -finline-functions=)]
- [$../../example/profile_gcc_cpp11_release.png [width 13in] [height 10in]]
+ [$../../example/profile_gcc_cxx11_release.png [width 13in] [height 10in]]
     ] ]
     [ [
         [*Compiled with =bjam debug ...= for no optimization (=-O0 -fno-inline=)]
- [$../../example/profile_gcc_cpp11_debug.png [width 13in] [height 10in]]
+ [$../../example/profile_gcc_cxx11_debug.png [width 13in] [height 10in]]
     ] ]
 ]
 

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION(declarations)</pre></div>
 <div class="refsect1">
-<a name="id866718"></a><h2>Description</h2>
+<a name="id880472"></a><h2>Description</h2>
 <p>This macro must be used within a declarative context, it must follow the local function result type, it must be followed by the local function body code, and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a></code> macro (see the <a class="link" href="boost_localfunction/Tutorial.html" title="Tutorial">Tutorial</a> and <a class="link" href="boost_localfunction/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> sections): </p>
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.</span>
     <span class="special">...</span>

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX</pre></div>
 <div class="refsect1">
-<a name="id869951"></a><h2>Description</h2>
+<a name="id882737"></a><h2>Description</h2>
 <p>If programmers leave this configuration macro undefined, its default value is <code class="computeroutput">5</code> (increasing this number might increase compilation time). When defined by programmers, this macro must be a non-negative integer number.</p>
 <p><span class="bold"><strong>Note:</strong></span> This macro specifies the maximum number of local function parameters excluding bound variables (which are instead specified by <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX">BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX</a></code>).</p>
 <p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_localfunction/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="boost_localfunction/Getting_Started.html" title="Getting Started"> Getting Started</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX">BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX</a></code>. </p>

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX</pre></div>
 <div class="refsect1">
-<a name="id870025"></a><h2>Description</h2>
+<a name="id882811"></a><h2>Description</h2>
 <p>If programmers leave this configuration macro undefined, its default value is <code class="computeroutput">10</code> (increasing this number might increase compilation time). When defined by programmers, this macro must be a non-negative integer number.</p>
 <p><span class="bold"><strong>Note:</strong></span> This macro specifies the maximum number of bound variables excluding local function parameters (which are instead specified by <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX">BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX</a></code>).</p>
 <p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_localfunction/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="boost_localfunction/Getting_Started.html" title="Getting Started"> Getting Started</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX">BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX</a></code>. </p>

Added: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_ID.html
==============================================================================
--- (empty file)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_ID.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -0,0 +1,79 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_ID</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.LocalFunction 1.0.0">
+<link rel="up" href="reference.html#header.boost.local_function_hpp" title="Header &lt;boost/local_function.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_ID"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_ID</span></h2>
+<p>BOOST_LOCAL_FUNCTION_ID &#8212; This macro allows to expand multiple local function macros on the same line. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.local_function_hpp" title="Header &lt;boost/local_function.hpp&gt;">boost/local_function.hpp</a>&gt;
+
+</span>BOOST_LOCAL_FUNCTION_ID(id, within_template, declarations)</pre></div>
+<div class="refsect1">
+<a name="id882031"></a><h2>Description</h2>
+<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> for more detail).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">id</code></strong></span></td>
+<td>A unique identifier token which can be catted by the preprocessor (for example <code class="computeroutput">__LINE__</code> or <code class="computeroutput">local_function_number_1_on_line_123</code>). </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">within_template</code></strong></span></td>
+<td>Specify <code class="computeroutput">1</code> when this macro is used in a type-dependant context, <code class="computeroutput">0</code> otherwise (this is equivalent to using <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code> on separate lines). </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">declarations</code></strong></span></td>
+<td>Same as the <code class="computeroutput">declarations</code> parameter of the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> macro. </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the local function macros are expanded within user-defined macros (because macros all expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro when expanding multiple local function macros on the same line is always necessary to ensure portability (this is because this library can only portably use <code class="computeroutput">__LINE__</code> to internally generate unique identifiers).</p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput">BOOST_SCOPE_EXIT_END_ID</code>, <code class="computeroutput">BOOST_SCOPE_EXIT_ALL_ID</code>, <code class="computeroutput">BOOST_SCOPE_EXIT</code>, <code class="computeroutput">BOOST_SCOPE_EXIT_TPL</code>. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Lorenzo
+ Caminiti<p>
+ Distributed under 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>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.LocalFunction 1.0.0">
 <link rel="up" href="reference.html#header.boost.local_function_hpp" title="Header &lt;boost/local_function.hpp&gt;">
-<link rel="prev" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">
 <link rel="next" href="BOOST_LOCAL_FUNCTION_TYPEOF.html" title="Macro BOOST_LOCAL_FUNCTION_TYPEOF">
 </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_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_LOCAL_FUNCTION_NAME"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION_NAME(qualified_function_name)</pre></div>
 <div class="refsect1">
-<a name="id869429"></a><h2>Description</h2>
+<a name="id882215"></a><h2>Description</h2>
 <p>This macro must follow the local function body code block <code class="computeroutput">{ ... }</code>: </p>
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.</span>
     <span class="special">...</span>
@@ -75,7 +75,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_FUNCTION_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TPL.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TPL.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TPL.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.LocalFunction 1.0.0">
 <link rel="up" href="reference.html#header.boost.local_function_hpp" title="Header &lt;boost/local_function.hpp&gt;">
 <link rel="prev" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">
-<link rel="next" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">
 </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_FUNCTION.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_LOCAL_FUNCTION_TPL"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION_TPL(declarations)</pre></div>
 <div class="refsect1">
-<a name="id869251"></a><h2>Description</h2>
+<a name="id881158"></a><h2>Description</h2>
 <p>This macro must be used instead of <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> when declaring a local function within a template. A part from that, this macro has the exact same syntax as <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> (see <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> for more information): </p>
 <pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context with a template.</span>
     <span class="special">...</span>
@@ -58,7 +58,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_LOCAL_FUNCTION.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_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_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TYPEOF.html
==============================================================================
--- trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TYPEOF.html (original)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_TYPEOF.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_LOCAL_FUNCTION_TYPEOF(bound_variable_name)</pre></div>
 <div class="refsect1">
-<a name="id869738"></a><h2>Description</h2>
+<a name="id882524"></a><h2>Description</h2>
 <p>This macro can be used within the local functions body to refer to the bound variable types so to declare local variables, check concepts (using Boost.ConceptCheck), etc (see the <a class="link" href="boost_localfunction/Advanced_Topics.html" title="Advanced Topics"> Advanced Topics</a> section). This way the local function can be programmed entirely without explicitly specifying the bound variable types thus facilitating maintenance (e.g., if the type of a bound variable changes in the enclosing scope, the local function code does not have to change).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">

Modified: trunk/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -45,6 +45,8 @@
       Specifications</a></span></dt>
 <dt><span class="section"><a href="Advanced_Topics.html#boost_localfunction.Advanced_Topics.storage_classifiers___auto__and__register__">Storage
       Classifiers (<code class="computeroutput"><span class="keyword">auto</span></code> and <code class="computeroutput"><span class="keyword">register</span></code>)</a></span></dt>
+<dt><span class="section"><a href="Advanced_Topics.html#boost_localfunction.Advanced_Topics.same_line_expansions">Same
+ Line Expansions</a></span></dt>
 <dt><span class="section"><a href="Advanced_Topics.html#boost_localfunction.Advanced_Topics.limitations__operators__etc_">Limitations
       (operators, etc)</a></span></dt>
 </dl></div>
@@ -79,7 +81,7 @@
     <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_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">add</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
 </pre>
 <p>
       </p>
@@ -101,7 +103,7 @@
     <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_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">add</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
 </pre>
 <p>
       </p>
@@ -302,8 +304,8 @@
       </p>
 <p>
 </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">call1</span><span class="special">(</span><span class="identifier">boost</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="special">&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">5</span> <span class="special">);</span> <span class="special">}</span>
-<span class="keyword">void</span> <span class="identifier">call0</span><span class="special">(</span><span class="identifier">boost</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">void</span><span class="special">)&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">==</span> <span class="number">5</span> <span class="special">);</span> <span class="special">}</span>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">call1</span><span class="special">(</span><span class="identifier">boost</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="special">&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">5</span><span class="special">);</span> <span class="special">}</span>
+<span class="keyword">void</span> <span class="identifier">call0</span><span class="special">(</span><span class="identifier">boost</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">void</span><span class="special">)&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">f</span><span class="special">()</span> <span class="special">==</span> <span class="number">5</span><span class="special">);</span> <span class="special">}</span>
 
 <span class="identifier">boost</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">)&gt;</span> <span class="identifier">linear</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">slope</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">slope</span><span class="special">,</span>
@@ -312,7 +314,7 @@
     <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lin</span><span class="special">)</span>
 
     <span class="identifier">boost</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">)&gt;</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">lin</span><span class="special">;</span> <span class="comment">// Assign to local variable.</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</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">==</span> <span class="number">5</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">f</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">==</span> <span class="number">5</span><span class="special">);</span>
 
     <span class="identifier">call1</span><span class="special">(</span><span class="identifier">lin</span><span class="special">);</span> <span class="comment">// Pass to other functions.</span>
     <span class="identifier">call0</span><span class="special">(</span><span class="identifier">lin</span><span class="special">);</span>
@@ -322,7 +324,7 @@
 
 <span class="keyword">void</span> <span class="identifier">call</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span>
     <span class="identifier">boost</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">)&gt;</span> <span class="identifier">f</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</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">==</span> <span class="number">5</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">f</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">==</span> <span class="number">5</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -361,7 +363,7 @@
 <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">w</span><span class="special">;</span>
 
 <span class="keyword">for</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;=</span> <span class="number">2</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">i</span> <span class="special">*</span> <span class="number">10</span><span class="special">);</span>
-<span class="identifier">BOOST_CHECK</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">10</span> <span class="special">);</span> <span class="identifier">BOOST_CHECK</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">20</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</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">10</span><span class="special">);</span> <span class="identifier">BOOST_CHECK</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">20</span><span class="special">);</span>
 <span class="identifier">w</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">size</span><span class="special">());</span>
 
 <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
@@ -369,7 +371,7 @@
 <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">inc</span><span class="special">)</span>
 
 <span class="identifier">std</span><span class="special">::</span><span class="identifier">transform</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">w</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">inc</span><span class="special">);</span>
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">w</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">16</span> <span class="special">);</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">w</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">==</span> <span class="number">26</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">w</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">16</span><span class="special">);</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">w</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">==</span> <span class="number">26</span><span class="special">);</span>
 
 <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">inc</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">return</span> <span class="identifier">inc</span><span class="special">(</span><span class="identifier">i</span> <span class="special">+</span> <span class="identifier">j</span><span class="special">);</span> <span class="comment">// Call the other bound local function.</span>
@@ -377,7 +379,7 @@
 
 <span class="identifier">offset</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
 <span class="identifier">std</span><span class="special">::</span><span class="identifier">transform</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">w</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">begin</span><span class="special">(),</span> <span class="identifier">inc_sum</span><span class="special">);</span>
-<span class="identifier">BOOST_CHECK</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">27</span> <span class="special">);</span> <span class="identifier">BOOST_CHECK</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">47</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</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">27</span><span class="special">);</span> <span class="identifier">BOOST_CHECK</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">47</span><span class="special">);</span>
 </pre>
 <p>
       </p>
@@ -444,10 +446,10 @@
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</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</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="keyword">int</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof for concept checking.</span>
+ <span class="comment">// Type-of for concept checking.</span>
     <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">Addable</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special">&lt;</span>
             <span class="identifier">BOOST_LOCAL_FUNCTION_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)&gt;::</span><span class="identifier">type</span><span class="special">&gt;));</span>
- <span class="comment">// Typeof for declarations.</span>
+ <span class="comment">// Type-of for declarations.</span>
     <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">BOOST_LOCAL_FUNCTION_TYPEOF</span><span class="special">(</span>
             <span class="identifier">factor</span><span class="special">)&gt;::</span><span class="identifier">type</span> <span class="identifier">mult</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">sum</span> <span class="special">+=</span> <span class="identifier">mult</span><span class="special">;</span>
@@ -563,7 +565,7 @@
 <p>
 </p>
 <pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">adder</span> <span class="special">{</span>
- <span class="identifier">adder</span><span class="special">():</span> <span class="identifier">sum_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="identifier">adder</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">sum_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
 
     <span class="keyword">int</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">int</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="comment">// Explicitly specify bound variable and result types.</span>
@@ -575,6 +577,7 @@
         <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>
     <span class="special">}</span>
+
 <span class="keyword">private</span><span class="special">:</span>
     <span class="keyword">int</span> <span class="identifier">sum_</span><span class="special">;</span>
 <span class="special">};</span>
@@ -761,7 +764,7 @@
 </p>
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">add_i</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">y</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_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_overload</span> <span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_overload</span><span class="special">)</span> <span class="special">{</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"abc"</span><span class="special">;</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
             <span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">s</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">x</span><span class="special">)</span> <span class="special">{</span>
@@ -780,10 +783,10 @@
         <span class="special">,</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="special">&gt;</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">add_s</span><span class="special">,</span> <span class="identifier">add_d</span><span class="special">,</span> <span class="identifier">add_d</span><span class="special">,</span> <span class="identifier">add_i</span><span class="special">);</span> <span class="comment">// Overloaded function object.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">add</span><span class="special">(</span><span class="string">"xyz"</span><span class="special">)</span> <span class="special">==</span> <span class="string">"abcxyz"</span> <span class="special">);</span> <span class="comment">// Call `add_s`.</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">3.21</span><span class="special">)</span> <span class="special">-</span> <span class="number">4.44</span><span class="special">)</span> <span class="special">&lt;</span> <span class="number">0.001</span> <span class="special">);</span> <span class="comment">// Call `add_d` (no default).</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">3.21</span><span class="special">,</span> <span class="number">40.0</span><span class="special">)</span> <span class="special">-</span> <span class="number">44.44</span><span class="special">)</span> <span class="special">&lt;</span> <span class="number">0.001</span><span class="special">);</span> <span class="comment">// Call `add_d`.</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">add</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">==</span> <span class="number">3</span> <span class="special">);</span> <span class="comment">// Call `add_i`.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="string">"xyz"</span><span class="special">)</span> <span class="special">==</span> <span class="string">"abcxyz"</span><span class="special">);</span> <span class="comment">// Call `add_s`.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">fabs</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">3.21</span><span class="special">)</span> <span class="special">-</span> <span class="number">4.44</span><span class="special">)</span> <span class="special">&lt;</span> <span class="number">0.001</span><span class="special">);</span> <span class="comment">// Call `add_d` (no default).</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">fabs</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="number">3.21</span><span class="special">,</span> <span class="number">40.0</span><span class="special">)</span> <span class="special">-</span> <span class="number">44.44</span><span class="special">)</span> <span class="special">&lt;</span> <span class="number">0.001</span><span class="special">);</span> <span class="comment">// Call `add_d`.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">add</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">==</span> <span class="number">3</span><span class="special">);</span> <span class="comment">// Call `add_i`.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -862,6 +865,64 @@
 <p>
       </p>
 </div>
+<div class="section boost_localfunction_Advanced_Topics_same_line_expansions">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_localfunction.Advanced_Topics.same_line_expansions"></a><a class="link" href="Advanced_Topics.html#boost_localfunction.Advanced_Topics.same_line_expansions" title="Same Line Expansions">Same
+ Line Expansions</a>
+</h3></div></div></div>
+<p>
+ In general, it is not possible to expand the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code>
+ macros multiple times on the same line. <sup>[<a name="boost_localfunction.Advanced_Topics.same_line_expansions.f0" href="#ftn.boost_localfunction.Advanced_Topics.same_line_expansions.f0" class="footnote">26</a>]</sup>
+ </p>
+<p>
+ Therefore, this library provides the additional macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">BOOST_LOCAL_FUNCTION_ID</a></code>
+ which can be expanded multiple times on the same line as long as programmers
+ specify a unique identifier as the macro's first parameter. The unique identifier
+ can be any token (not just numeric) that can be successfully concatenated
+ by the preprocessor (e.g., <code class="computeroutput"><span class="identifier">local_function_number_1_at_line_123</span></code>).
+ The second parameter of <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">BOOST_LOCAL_FUNCTION_ID</a></code>
+ is <code class="computeroutput"><span class="number">1</span></code> if the macro is used within
+ a template (equivalent to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code>),
+ or <code class="computeroutput"><span class="number">0</span></code> otherwise. Finally, <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">BOOST_LOCAL_FUNCTION_ID</a></code> accept
+ the local function parameter declaration list using the exact same syntax
+ as <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>.
+ </p>
+<p>
+ For example (see also same_line.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">LOCAL_INC_DEC</span><span class="special">(</span><span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION_ID</span><span class="special">(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">x</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">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">inc</span><span class="special">)</span> <span class="special">\</span>
+ <span class="special">\</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION_ID</span><span class="special">(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">x</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">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">dec</span><span class="special">)</span>
+
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_same_line</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">delta</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+ <span class="identifier">LOCAL_INC_DEC</span><span class="special">(</span><span class="identifier">delta</span><span class="special">)</span> <span class="comment">// Declare local functions on same line using `_ID`.</span>
+
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">dec</span><span class="special">(</span><span class="identifier">inc</span><span class="special">(</span><span class="number">123</span><span class="special">))</span> <span class="special">==</span> <span class="number">123</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ As indicated by the example above, the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">BOOST_LOCAL_FUNCTION_ID</a></code>
+ macro is especially useful when it is necessary to invoke it multiple times
+ within a user-defined macro (because the preprocessor expands all nested
+ macros on the same line).
+ </p>
+</div>
 <div class="section boost_localfunction_Advanced_Topics_limitations__operators__etc_">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_localfunction.Advanced_Topics.limitations__operators__etc_"></a><a class="link" href="Advanced_Topics.html#boost_localfunction.Advanced_Topics.limitations__operators__etc_" title="Limitations (operators, etc)">Limitations
@@ -1138,7 +1199,7 @@
       </h6>
 <p>
         Local functions cannot be operators. Naming a local function <code class="computeroutput"><span class="keyword">operator</span><span class="special">...</span></code>
- will generate a compile-time error. <sup>[<a name="boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" href="#ftn.boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" class="footnote">26</a>]</sup>
+ will generate a compile-time error. <sup>[<a name="boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" href="#ftn.boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" class="footnote">27</a>]</sup>
       </p>
 <p>
         For example, the following code will not compile (see also operator_error.cpp):
@@ -1150,14 +1211,14 @@
     <span class="keyword">int</span> <span class="identifier">y</span><span class="special">;</span>
 <span class="special">};</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_operator_err</span> <span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_operator_error</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">bool</span> <span class="identifier">BOOST_LOCAL_FUNCTION</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="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="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> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="keyword">operator</span><span class="special">==)</span> <span class="comment">// Error: Cannot use `operator...`.</span>
 
     <span class="identifier">point</span> <span class="identifier">a</span><span class="special">;</span> <span class="identifier">a</span><span class="special">.</span><span class="identifier">x</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">a</span><span class="special">.</span><span class="identifier">y</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
     <span class="identifier">point</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">a</span><span class="special">;</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">a</span> <span class="special">==</span> <span class="identifier">b</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="identifier">b</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -1179,7 +1240,6 @@
     <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span>
         <span class="keyword">if</span><span class="special">(</span><span class="identifier">x</span> <span class="special">&lt;=</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">goto</span> <span class="identifier">failure</span><span class="special">;</span> <span class="comment">// Error: Cannot jump to enclosing scope.</span>
         <span class="keyword">else</span> <span class="keyword">goto</span> <span class="identifier">success</span><span class="special">;</span> <span class="comment">// OK: Can jump within local function.</span>
-
     <span class="identifier">success</span><span class="special">:</span>
         <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
     <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">validate</span><span class="special">)</span>
@@ -1279,7 +1339,16 @@
           classifier with the usual care in order to avoid writing C++03
           code that might not work on C++11.
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" href="#boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" class="para">26</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Advanced_Topics.same_line_expansions.f0" href="#boost_localfunction.Advanced_Topics.same_line_expansions.f0" class="para">26</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> The <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ and <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code>
+ macros internally use <code class="computeroutput"><span class="identifier">__LINE__</span></code>
+ to generate unique identifiers. Therefore, if the same macro is expanded
+ more than on time on the same line, the generated identifiers will no longer
+ be unique and the code will not compile. (This restriction does not apply
+ to MSVC and other compilers that provide the non-standard <code class="computeroutput"><span class="identifier">__COUNTER__</span></code> macro.)
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" href="#boost_localfunction.Advanced_Topics.limitations__operators__etc_.f1" class="para">27</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 used
           to hold the local functor) and operators cannot be used as local variable

Modified: trunk/libs/local_function/doc/html/boost_localfunction/Alternatives.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/Alternatives.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/Alternatives.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -541,7 +541,7 @@
     <span class="comment">// Unfortunately, cannot pass as template parameter to `std::for_each`.</span>
     <span class="keyword">for</span><span class="special">(</span><span class="identifier">size_t</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">nums</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -561,7 +561,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -610,7 +610,7 @@
     <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">factor</span><span class="special">;</span> <span class="comment">// Make `factor` constant.</span>
 <span class="special">};</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_add_global_functor</span> <span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_add_global_functor</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
 
     <span class="identifier">global_add</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">sum</span><span class="special">,</span> <span class="identifier">factor</span><span class="special">);</span>
@@ -619,7 +619,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Passed as template parameter.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -639,7 +639,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -696,7 +696,7 @@
         <span class="identifier">ref</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)</span> <span class="special">+=</span> <span class="identifier">_f</span> <span class="special">*</span> <span class="identifier">_1</span><span class="special">,</span> <span class="identifier">_1</span> <span class="comment">// Access `sum` by reference.</span>
     <span class="special">]);</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -716,7 +716,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>

Modified: trunk/libs/local_function/doc/html/boost_localfunction/Examples.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/Examples.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/Examples.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -246,7 +246,7 @@
         <code class="computeroutput"><span class="special">=</span><span class="identifier">variable</span></code>,
         and <code class="computeroutput"><span class="special">=</span></code>) are constant but they
         are required to be <code class="computeroutput"><span class="identifier">CopyConstructible</span></code>
- and they introduce potentially expensive copy operations. <sup>[<a name="boost_localfunction.Examples.constant_blocks.f0" href="#ftn.boost_localfunction.Examples.constant_blocks.f0" class="footnote">27</a>]</sup>
+ and they introduce potentially expensive copy operations. <sup>[<a name="boost_localfunction.Examples.constant_blocks.f0" href="#ftn.boost_localfunction.Examples.constant_blocks.f0" class="footnote">28</a>]</sup>
       </p>
 </div>
 <div class="section boost_localfunction_Examples_scope_exits">
@@ -375,7 +375,7 @@
 <td>
                 <p>
 </p>
-<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_phoenix_factorial_local</span> <span class="special">)</span> <span class="special">{</span>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_phoenix_factorial_local</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg1</span><span class="special">;</span>
 
     <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</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="comment">// Unfortunately, monomorphic.</span>
@@ -386,8 +386,8 @@
             <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">factorial_impl</span><span class="special">);</span> <span class="comment">// Phoenix function from local function.</span>
 
     <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">i</span><span class="special">)()</span> <span class="special">==</span> <span class="number">24</span> <span class="special">);</span> <span class="comment">// Call.</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <span class="number">24</span> <span class="special">);</span> <span class="comment">// Lazy call.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">(</span><span class="identifier">i</span><span class="special">)()</span> <span class="special">==</span> <span class="number">24</span><span class="special">);</span> <span class="comment">// Call.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <span class="number">24</span><span class="special">);</span> <span class="comment">// Lazy call.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -412,14 +412,14 @@
     <span class="special">}</span>
 <span class="special">};</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_phoenix_factorial</span> <span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_phoenix_factorial</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg1</span><span class="special">;</span>
 
     <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="identifier">factorial_impl</span><span class="special">&gt;</span> <span class="identifier">factorial</span><span class="special">;</span>
 
     <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">i</span><span class="special">)()</span> <span class="special">==</span> <span class="number">24</span> <span class="special">);</span> <span class="comment">// Call.</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <span class="number">24</span> <span class="special">);</span> <span class="comment">// Lazy call.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">(</span><span class="identifier">i</span><span class="special">)()</span> <span class="special">==</span> <span class="number">24</span><span class="special">);</span> <span class="comment">// Call.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <span class="number">24</span><span class="special">);</span> <span class="comment">// Lazy call.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -430,7 +430,7 @@
 <p>
         This is presented here mainly as a curiosity because Boost.Phoenix
         functions created from local functions have the important limitation that
- they cannot be polymorphic. <sup>[<a name="boost_localfunction.Examples.boost_phoenix_functions.f0" href="#ftn.boost_localfunction.Examples.boost_phoenix_functions.f0" class="footnote">28</a>]</sup> Therefore, in many cases creating the Boost.Phoenix
+ they cannot be polymorphic. <sup>[<a name="boost_localfunction.Examples.boost_phoenix_functions.f0" href="#ftn.boost_localfunction.Examples.boost_phoenix_functions.f0" class="footnote">29</a>]</sup> Therefore, in many cases creating the Boost.Phoenix
         function from global functors (possibly with the help of Boost.Phoenix
         adaptor macros) might be a more valuable option.
       </p>
@@ -578,12 +578,12 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Examples.constant_blocks.f0" href="#boost_localfunction.Examples.constant_blocks.f0" class="para">27</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Examples.constant_blocks.f0" href="#boost_localfunction.Examples.constant_blocks.f0" class="para">28</a>] </sup>
           Ideally, <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++11
           lambda</a> functions would allow to bind variables also using <code class="computeroutput"><span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">variable</span></code> (constant reference) and <code class="computeroutput"><span class="keyword">const</span><span class="special">&amp;</span></code>
           (all variables by constant reference).
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Examples.boost_phoenix_functions.f0" href="#boost_localfunction.Examples.boost_phoenix_functions.f0" class="para">28</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Examples.boost_phoenix_functions.f0" href="#boost_localfunction.Examples.boost_phoenix_functions.f0" class="para">29</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> Local functions can only be
           monomorphic because they are implemented using local classes and local
           classes cannot be templates in C++ (not even in C++11).

Modified: trunk/libs/local_function/doc/html/boost_localfunction/Implementation.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/Implementation.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/Implementation.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -106,7 +106,7 @@
     <span class="identifier">interface</span><span class="special">*</span> <span class="identifier">func_</span><span class="special">;</span>
 <span class="special">};</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_impl_tparam_tricks</span> <span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_impl_tparam_tricks</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
 
     <span class="comment">// Local class for local function.</span>
@@ -134,11 +134,11 @@
     <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">10</span><span class="special">);</span>
     <span class="identifier">std</span><span class="special">::</span><span class="identifier">fill</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="number">1</span><span class="special">);</span>
 
-<span class="comment">// std::for_each(v.begin(), v.end(), add_local); // Error but OK on C++11.</span>
+ <span class="comment">// std::for_each(v.begin(), v.end(), add_local); // Error but OK on C++11.</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">add_casting</span><span class="special">);</span> <span class="comment">// OK.</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">add_virtual</span><span class="special">);</span> <span class="comment">// OK.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">200</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">200</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -172,7 +172,7 @@
       special code to bind by constant), etc. The parameter tokens are inspected
       using preprocessor metaprogramming and specifically using the macros defined
       by the files in the <code class="literal">boost/local_function/detail/preprocessor/keyword/</code>
- directory. <sup>[<a name="boost_localfunction.Implementation.f0" href="#ftn.boost_localfunction.Implementation.f0" class="footnote">29</a>]</sup>
+ directory. <sup>[<a name="boost_localfunction.Implementation.f0" href="#ftn.boost_localfunction.Implementation.f0" class="footnote">30</a>]</sup>
     </p>
 <p>
       For example, the following code defines a macro that allows the preprocessor
@@ -195,16 +195,16 @@
         <span class="identifier">tokens</span> <span class="special">\</span>
     <span class="special">)))</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test_impl_pp_keyword</span> <span class="special">)</span> <span class="special">{</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">IS_THIS_BACK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span> <span class="special">);</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">IS_THIS_BACK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span> <span class="special">);</span>
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_impl_pp_keyword</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">IS_THIS_BACK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">IS_THIS_BACK</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
     </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Implementation.f0" href="#boost_localfunction.Implementation.f0" class="para">29</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.boost_localfunction.Implementation.f0" href="#boost_localfunction.Implementation.f0" class="para">30</a>] </sup>
         This technique is at the core of even more complex preprocessor parsing macros
         like the ones that parse the Contract++
         syntax.

Modified: trunk/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -57,18 +57,18 @@
     </p>
 <p>
 </p>
-<pre class="programlisting"><span class="special">{</span> <span class="comment">// Some local scope.</span>
- <span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span> <span class="comment">// Variables in scope to bind.</span>
+<pre class="programlisting"><span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</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</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="keyword">int</span> <span class="identifier">num</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="comment">// Parameters as sequence.</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="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">1</span><span class="special">);</span> <span class="comment">// Call the local function.</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -90,7 +90,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -107,7 +107,7 @@
     <span class="keyword">return</span> <span class="number">10</span><span class="special">;</span>
 <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ten</span><span class="special">)</span>
 
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">ten</span><span class="special">()</span> <span class="special">==</span> <span class="number">10</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">ten</span><span class="special">()</span> <span class="special">==</span> <span class="number">10</span><span class="special">);</span>
 </pre>
 <p>
     </p>
@@ -121,158 +121,7 @@
       using the sequence syntax (see also seq.cpp):
     </p>
 <p>
-</p>
-<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">s</span> <span class="special">{</span>
- <span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">p</span> <span class="special">=</span> <span class="number">1.23</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">q</span> <span class="special">=</span> <span class="special">-</span><span class="number">1.23</span><span class="special">)</span> <span class="special">{</span>
- <span class="special">{</span> <span class="comment">// Only params.</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</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="special">}</span>
- <span class="special">{</span> <span class="comment">// Only const binds.</span>
- <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">;</span>
-
- <span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">b</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
- <span class="identifier">l</span><span class="special">();</span>
-
- <span class="keyword">const</span> <span class="identifier">s</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="special">*</span><span class="identifier">this_</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
- <span class="identifier">t</span><span class="special">();</span>
-
- <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">a</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
- <span class="identifier">lt</span><span class="special">();</span>
- <span class="special">}</span>
- <span class="special">{</span> <span class="comment">// Only plain binds.</span>
- <span class="keyword">int</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
-
- <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</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="keyword">return</span> <span class="identifier">d</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
- <span class="identifier">l</span><span class="special">();</span>
-
- <span class="identifier">s</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="special">*</span><span class="identifier">this_</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
- <span class="identifier">t</span><span class="special">();</span>
-
- <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">c</span><span class="special">;</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
- <span class="identifier">lt</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="special">{</span> <span class="comment">// Both params and const binds.</span>
- <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">;</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</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="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
- <span class="identifier">t</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
- <span class="identifier">lt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="special">{</span> <span class="comment">// Both params and plain binds.</span>
- <span class="keyword">int</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</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="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
- <span class="identifier">t</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
- <span class="identifier">lt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="special">{</span> <span class="comment">// Both const and plain binds.</span>
- <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
- <span class="identifier">l</span><span class="special">();</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ct</span><span class="special">)</span>
- <span class="identifier">ct</span><span class="special">();</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lct</span><span class="special">)</span>
- <span class="identifier">lct</span><span class="special">();</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span>
- <span class="identifier">pt</span><span class="special">();</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</span><span class="special">)</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lpt</span><span class="special">)</span>
- <span class="identifier">lpt</span><span class="special">();</span>
- <span class="special">}</span>
-
- <span class="special">{</span> <span class="comment">// All params, const binds, and plain binds.</span>
- <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</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="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ct</span><span class="special">)</span>
- <span class="identifier">ct</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
- <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span>
- <span class="identifier">pt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
-
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
- <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lct</span><span class="special">)</span>
- <span class="identifier">lct</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</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">b</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">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</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="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
- <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lpt</span><span class="special">)</span>
- <span class="identifier">lpt</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>
-</pre>
-<p>
+ [seq]
     </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/local_function/doc/html/boost_localfunction/Tutorial.html
==============================================================================
--- trunk/libs/local_function/doc/html/boost_localfunction/Tutorial.html (original)
+++ trunk/libs/local_function/doc/html/boost_localfunction/Tutorial.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -84,7 +84,7 @@
         controlled at compile-time by the configuration macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX">BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX</a></code>.
         For example, let's program a local function named <code class="computeroutput"><span class="identifier">add</span></code>
         that adds together two integers <code class="computeroutput"><span class="identifier">x</span></code>
- and <code class="computeroutput"><span class="identifier">y</span></code> (see also add_params.cpp):
+ and <code class="computeroutput"><span class="identifier">y</span></code> (see also add_params_only.cpp):
       </p>
 <p>
 </p>
@@ -92,7 +92,7 @@
     <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_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">add</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">==</span> <span class="number">3</span> <span class="special">);</span> <span class="comment">// Local function call.</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">add</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">==</span> <span class="number">3</span><span class="special">);</span> <span class="comment">// Local function call.</span>
 </pre>
 <p>
       </p>
@@ -113,7 +113,7 @@
     <span class="keyword">return</span> <span class="number">10</span><span class="special">;</span>
 <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ten</span><span class="special">)</span>
 
-<span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">ten</span><span class="special">()</span> <span class="special">==</span> <span class="number">10</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">ten</span><span class="special">()</span> <span class="special">==</span> <span class="number">10</span><span class="special">);</span>
 </pre>
 <p>
       </p>
@@ -242,7 +242,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -315,7 +315,7 @@
 <p>
 </p>
 <pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">adder</span> <span class="special">{</span>
- <span class="identifier">adder</span><span class="special">():</span> <span class="identifier">sum_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="identifier">adder</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">sum_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
 
     <span class="keyword">int</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">int</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="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">)</span> <span class="special">{</span>
 
@@ -326,6 +326,7 @@
         <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>
     <span class="special">}</span>
+
 <span class="keyword">private</span><span class="special">:</span>
     <span class="keyword">int</span> <span class="identifier">sum_</span><span class="special">;</span>
 <span class="special">};</span>

Modified: trunk/libs/local_function/doc/html/index.html
==============================================================================
--- trunk/libs/local_function/doc/html/index.html (original)
+++ trunk/libs/local_function/doc/html/index.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -75,6 +75,8 @@
       Specifications</a></span></dt>
 <dt><span class="section"><a href="boost_localfunction/Advanced_Topics.html#boost_localfunction.Advanced_Topics.storage_classifiers___auto__and__register__">Storage
       Classifiers (<code class="computeroutput"><span class="keyword">auto</span></code> and <code class="computeroutput"><span class="keyword">register</span></code>)</a></span></dt>
+<dt><span class="section"><a href="boost_localfunction/Advanced_Topics.html#boost_localfunction.Advanced_Topics.same_line_expansions">Same
+ Line Expansions</a></span></dt>
 <dt><span class="section"><a href="boost_localfunction/Advanced_Topics.html#boost_localfunction.Advanced_Topics.limitations__operators__etc_">Limitations
       (operators, etc)</a></span></dt>
 </dl></dd>
@@ -168,7 +170,7 @@
     <span class="keyword">int</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">2</span><span class="special">,</span> <span class="number">3</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="number">2</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <span class="comment">// Pass it to an algorithm.</span>
 
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span> <span class="special">);</span> <span class="comment">// Assert final summation value.</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">60</span><span class="special">);</span> <span class="comment">// Assert final summation value.</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -222,7 +224,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: February 17, 2012 at 22:11:08 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 19, 2012 at 22:33:31 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/local_function/doc/html/reference.html
==============================================================================
--- trunk/libs/local_function/doc/html/reference.html (original)
+++ trunk/libs/local_function/doc/html/reference.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -37,6 +37,7 @@
 
 <a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a>(declarations)
 <a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a>(declarations)
+<a class="link" href="BOOST_LOCAL_FUNCTION_ID.html" title="Macro BOOST_LOCAL_FUNCTION_ID">BOOST_LOCAL_FUNCTION_ID</a>(id, within_template, declarations)
 <a class="link" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">BOOST_LOCAL_FUNCTION_NAME</a>(qualified_function_name)
 <a class="link" href="BOOST_LOCAL_FUNCTION_TYPEOF.html" title="Macro BOOST_LOCAL_FUNCTION_TYPEOF">BOOST_LOCAL_FUNCTION_TYPEOF</a>(bound_variable_name)</pre>
 </div>

Modified: trunk/libs/local_function/doc/local_function.qbk
==============================================================================
--- trunk/libs/local_function/doc/local_function.qbk (original)
+++ trunk/libs/local_function/doc/local_function.qbk 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -85,7 +85,7 @@
 [import ../test/add_classifiers.cpp]
 [import ../test/operator_error.cpp]
 [import ../test/goto_error.cpp]
-[import ../test/seq.cpp]
+[import ../test/same_line.cpp]
 
 [import ../example/gcc_lambda.cpp]
 [import ../example/gcc_lambda_cpp11.cpp]

Modified: trunk/libs/local_function/example/Jamfile.v2
==============================================================================
--- trunk/libs/local_function/example/Jamfile.v2 (original)
+++ trunk/libs/local_function/example/Jamfile.v2 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -22,7 +22,7 @@
 
 run gcc_access.cpp ;
 run gcc_lambda.cpp ;
-run gcc_lambda_cpp11.cpp ;
+run gcc_lambda_cxx11.cpp ;
 run gcc_square.cpp ;
 run gcc_store.cpp ;
 

Deleted: trunk/libs/local_function/example/gcc_lambda_cpp11.cpp
==============================================================================
--- trunk/libs/local_function/example/gcc_lambda_cpp11.cpp 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
+++ (empty file)
@@ -1,37 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under 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)
-// Home at http://www.boost.org/libs/local_function
-
-#include <boost/config.hpp>
-#ifndef BOOST_NO_LAMBDAS
-
-#define BOOST_TEST_MODULE TestGccLambdaCpp11
-#include <boost/test/unit_test.hpp>
-#include <algorithm>
-
-BOOST_AUTO_TEST_CASE(test_gcc_lambda_cpp11) {
- //[gcc_lambda_cpp11
- int val = 2;
- int nums[] = {1, 2, 3};
- int* end = nums + 3;
-
- int* iter = std::find_if(nums, end,
- [val](int num) -> bool {
- return num == val;
- }
- );
- //]
-
- BOOST_CHECK(iter != end);
- BOOST_CHECK(*iter == val);
-}
-
-#else
-
-int main(void) { return 0; } // Trivial test.
-
-#endif
-

Deleted: trunk/libs/local_function/example/profile_gcc_cpp11_debug.png
==============================================================================
Binary file. No diff available.

Deleted: trunk/libs/local_function/example/profile_gcc_cpp11_release.png
==============================================================================
Binary file. No diff available.

Modified: trunk/libs/local_function/test/same_line.cpp
==============================================================================
--- trunk/libs/local_function/test/same_line.cpp (original)
+++ trunk/libs/local_function/test/same_line.cpp 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -31,7 +31,7 @@
 BOOST_AUTO_TEST_CASE(test_same_line)
 {
     int delta = 10;
- LOCAL_INC_DEC(delta) // Declare local functions on same line using `_ID`.
+ LOCAL_INC_DEC(delta) // Multiple local functions on same line.
     
     BOOST_CHECK(dec(inc(123)) == 123);
 }

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id918593"></a><h2>Description</h2>
+<a name="id889067"></a><h2>Description</h2>
 <p>The scope exit declaration schedules the execution of the scope exit body at the exit of the enclosing scope:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_ALL(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id920971"></a><h2>Description</h2>
+<a name="id890352"></a><h2>Description</h2>
 <p>This macro accepts a capture list starting with either <code class="computeroutput">&amp;</code> or <code class="computeroutput">=</code> to capture all variables in scope by reference or value respectively (following the same syntax of C++11 lambdas). A part from that, this macro works like <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more information).</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_ALL_ID(id, capture_list)</pre></div>
 <div class="refsect1">
-<a name="id921508"></a><h2>Description</h2>
+<a name="id890890"></a><h2>Description</h2>
 <p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> for more detail).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">

Added: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html
==============================================================================
--- (empty file)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -0,0 +1,57 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
+<link rel="up" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">
+<link rel="prev" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">
+<link rel="next" href="scope_exit/Alternatives.html" title="Annex: Alternatives">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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="scope_exit/Alternatives.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL</span></h2>
+<p>BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL &#8212; Force to use C++11 lambda implementation for scope-exit macro. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">boost/scope_exit.hpp</a>&gt;
+
+</span>BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL</pre></div>
+<div class="refsect1">
+<a name="id891389"></a><h2>Description</h2>
+<p>If programmers define this configuration macro on a C++11 compiler, lambda functions will be used to implement the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> macro. By default this macro is not defined.</p>
+<p><span class="bold"><strong>Note:</strong></span> When <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> is implemented using lambda, the semantics of its variable captures follow the semantics of C++11 lambda captures which are in general different from the legacy capture semantics of this library (e.g., C++11 lambdas require to capture data members via capturing the object <code class="computeroutput">this</code> while this library always allowed to capture data members directly). Therefore, when this configuration macro is defined, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> is no longer backward compatible.</p>
+<p>A semicolon <code class="computeroutput">;</code> can simply be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> when this configuration macro is defined.</p>
+<p>This configuration macro does not control the definition of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> which is always and automatically defined on compilers that support C++11 lambdas.</p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2012 Alexander Nasonov, Lorenzo Caminiti<p>
+ Distributed under 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>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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="scope_exit/Alternatives.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_END</pre></div>
 <div class="refsect1">
-<a name="id921657"></a><h2>Description</h2>
+<a name="id891039"></a><h2>Description</h2>
 <p>This macro must follow the closing curly bracket <code class="computeroutput">}</code> that ends the scope exit body:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">
 <link rel="prev" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">
-<link rel="next" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION">
+<link rel="next" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">
 </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_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_SCOPE_EXIT_END_ID"></a><div class="titlepage"></div>
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_END_ID(id)</pre></div>
 <div class="refsect1">
-<a name="id921883"></a><h2>Description</h2>
+<a name="id891264"></a><h2>Description</h2>
 <p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> for more detail).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
@@ -62,7 +62,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_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_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_ID(id, within_template, capture_list)</pre></div>
 <div class="refsect1">
-<a name="id919684"></a><h2>Description</h2>
+<a name="id890158"></a><h2>Description</h2>
 <p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more detail).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT_TPL(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id919151"></a><h2>Description</h2>
+<a name="id889625"></a><h2>Description</h2>
 <p>Various versions of the GCC compiler do not compile <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> inside function templates. As a workaround, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> should be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> in these cases:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>

Modified: trunk/libs/scope_exit/doc/html/index.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/index.html (original)
+++ trunk/libs/scope_exit/doc/html/index.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -55,8 +55,9 @@
       No Variable</a></span></dt>
 <dt><span class="section"><a href="scope_exit/Tutorial.html#scope_exit.Tutorial.capturing_all_variables__c__11_only_">Capturing
       All Variables (C++11 Only)</a></span></dt>
-<dt><span class="section"><a href="scope_exit/Tutorial.html#scope_exit.Tutorial.gcc_template_workaround">GCC Template
- Workaround</a></span></dt>
+<dt><span class="section"><a href="scope_exit/Tutorial.html#scope_exit.Tutorial.template_workaround__gcc_">Template
+ Workaround (GCC)</a></span></dt>
+<dt><span class="section">Same Line Expansions</span></dt>
 </dl></dd>
 <dt><span class="section">Reference</span></dt>
 <dd><dl><dt><span class="section">Header <boost/scope_exit.hpp></span></dt></dl></dd>
@@ -123,7 +124,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 19, 2012 at 16:57:51 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 19, 2012 at 22:24:35 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/scope_exit/doc/html/reference.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/reference.html (original)
+++ trunk/libs/scope_exit/doc/html/reference.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -39,7 +39,7 @@
 <a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a>(id, capture_list)
 <a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a>
 <a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a>(id)
-<a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION</a></pre>
+<a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL</a></pre>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
-<link rel="prev" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION">
+<link rel="prev" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">
 <link rel="next" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">
 </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_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.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="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.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="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section scope_exit_Alternatives">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -312,7 +312,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPLEMENTATION.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="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.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="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -34,8 +34,9 @@
       No Variable</a></span></dt>
 <dt><span class="section"><a href="Tutorial.html#scope_exit.Tutorial.capturing_all_variables__c__11_only_">Capturing
       All Variables (C++11 Only)</a></span></dt>
-<dt><span class="section"><a href="Tutorial.html#scope_exit.Tutorial.gcc_template_workaround">GCC Template
- Workaround</a></span></dt>
+<dt><span class="section"><a href="Tutorial.html#scope_exit.Tutorial.template_workaround__gcc_">Template
+ Workaround (GCC)</a></span></dt>
+<dt><span class="section">Same Line Expansions</span></dt>
 </dl></div>
 <p>
       This section illustrates how to use this library.
@@ -332,17 +333,17 @@
         are captured by value).
       </p>
 </div>
-<div class="section scope_exit_Tutorial_gcc_template_workaround">
+<div class="section scope_exit_Tutorial_template_workaround__gcc_">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="scope_exit.Tutorial.gcc_template_workaround"></a><a class="link" href="Tutorial.html#scope_exit.Tutorial.gcc_template_workaround" title="GCC Template Workaround">GCC Template
- Workaround</a>
+<a name="scope_exit.Tutorial.template_workaround__gcc_"></a><a class="link" href="Tutorial.html#scope_exit.Tutorial.template_workaround__gcc_" title="Template Workaround (GCC)">Template
+ Workaround (GCC)</a>
 </h3></div></div></div>
 <p>
         Various versions of the GCC compiler do not compile <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
         inside templates (see the Reference section
         for more information). As a workaround, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
         should be used instead of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
- in these cases: <sup>[<a name="scope_exit.Tutorial.gcc_template_workaround.f0" href="#ftn.scope_exit.Tutorial.gcc_template_workaround.f0" class="footnote">6</a>]</sup>
+ in these cases: <sup>[<a name="scope_exit.Tutorial.template_workaround__gcc_.f0" href="#ftn.scope_exit.Tutorial.template_workaround__gcc_.f0" class="footnote">6</a>]</sup>
       </p>
 <p>
 </p>
@@ -367,6 +368,88 @@
         macro has the exact same syntax of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>.
       </p>
 </div>
+<div class="section scope_exit_Tutorial_same_line_expansions">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="scope_exit.Tutorial.same_line_expansions"></a><a class="link" href="Tutorial.html#scope_exit.Tutorial.same_line_expansions" title="Same Line Expansions">Same Line Expansions</a>
+</h3></div></div></div>
+<p>
+ In general, it is not possible to expand the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>, and
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> macros
+ multiple times on the same line. <sup>[<a name="scope_exit.Tutorial.same_line_expansions.f0" href="#ftn.scope_exit.Tutorial.same_line_expansions.f0" class="footnote">7</a>]</sup>
+ </p>
+<p>
+ Therefore, this library provides additional macros <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>,
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>
+ which can be expanded multiple times on the same line as long as programmers
+ specify a unique identifier as the macro's first parameter. The unique identifier
+ can be any token (not just numeric) that can be successfully concatenated
+ by the preprocessor (e.g., <code class="computeroutput"><span class="identifier">scope_exit_number_1_at_line_123</span></code>).
+ The second parameter of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>
+ shall be <code class="computeroutput"><span class="number">1</span></code> if the macro is used
+ within a template (equivalent to <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>),
+ or <code class="computeroutput"><span class="number">0</span></code> otherwise. Finally, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code> and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code> accept
+ a capture list using the exact same syntax as <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ respectively.
+ </p>
+<p>
+ For example (see also same_line.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">SCOPE_EXIT_INC_DEC</span><span class="special">(</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span> <span class="special">\</span>
+ <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">-=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">SCOPE_EXIT_ALL_INC_DEC</span><span class="special">(</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="special">=,</span> <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">};</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="special">=,</span> <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">-=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">};</span>
+
+<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_same_line</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="number">0</span><span class="special">,</span> <span class="identifier">delta</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="special">{</span>
+ <span class="identifier">SCOPE_EXIT_INC_DEC</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">)</span>
+ <span class="special">}</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_LAMBDAS</span>
+ <span class="special">{</span>
+ <span class="identifier">SCOPE_EXIT_ALL_INC_DEC</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">)</span>
+ <span class="special">}</span>
+ <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ As indicated by the example above, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>,
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>
+ macros are especially useful when it is necessary to invoke them multiple
+ times within user-defined macros (because all nested macro will expand on
+ the same line).
+ </p>
+</div>
 <div class="footnotes">
 <br><hr width="100" align="left">
 <div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_variables.f0" href="#scope_exit.Tutorial.capturing_variables.f0" class="para">2</a>] </sup>
@@ -406,11 +489,20 @@
           token is never compared with neither <code class="computeroutput"><span class="keyword">void</span></code>
           or <code class="computeroutput"><span class="identifier">this_</span></code> for this macro).
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.gcc_template_workaround.f0" href="#scope_exit.Tutorial.gcc_template_workaround.f0" class="para">6</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.template_workaround__gcc_.f0" href="#scope_exit.Tutorial.template_workaround__gcc_.f0" class="para">6</a>] </sup>
           GCC versions compliant with C++11 do not present this issue and given that
           <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
           is only available on C++11 compilers, there is no need for a <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT_ALL_TPL</span></code> macro.
         </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.same_line_expansions.f0" href="#scope_exit.Tutorial.same_line_expansions.f0" class="para">7</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This library's macros internally
+ use <code class="computeroutput"><span class="identifier">__LINE__</span></code> to generate
+ unique identifiers. Therefore, if the same macro is expanded more than
+ on time on the same line, the generated identifiers will no longer be unique
+ and the code will not compile. (This restriction does not apply to MSVC
+ and other compilers that provide the non-standard <code class="computeroutput"><span class="identifier">__COUNTER__</span></code>
+ macro.)
+ </p></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/scope_exit.qbk
==============================================================================
--- trunk/libs/scope_exit/doc/scope_exit.qbk (original)
+++ trunk/libs/scope_exit/doc/scope_exit.qbk 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -52,6 +52,7 @@
 [import ../test/world_checkpoint_all.cpp]
 [import ../test/world_tpl.cpp]
 [import ../test/world_lambda.cpp]
+[import ../test/same_line.cpp]
 [import ../example/try_catch.cpp]
 [import ../example/scope_guard.cpp]
 
@@ -224,7 +225,7 @@
 
 [endsect]
 
-[section GCC Template Workaround]
+[section Template Workaround (GCC)]
 
 Various versions of the GCC compiler do not compile [macroref BOOST_SCOPE_EXIT] inside templates (see the __Reference__ section for more information).
 As a workaround, [macroref BOOST_SCOPE_EXIT_TPL] should be used instead of [macroref BOOST_SCOPE_EXIT] in these cases:
@@ -238,6 +239,29 @@
 
 [endsect]
 
+[section Same Line Expansions]
+
+In general, it is not possible to expand the [macroref BOOST_SCOPE_EXIT], [macroref BOOST_SCOPE_EXIT_TPL], [macroref BOOST_SCOPE_EXIT_END], and [macroref BOOST_SCOPE_EXIT_ALL] macros multiple times on the same line.
+[footnote
+*Rationale.*
+This library's macros internally use `__LINE__` to generate unique identifiers.
+Therefore, if the same macro is expanded more than on time on the same line, the generated identifiers will no longer be unique and the code will not compile.
+(This restriction does not apply to MSVC and other compilers that provide the non-standard `__COUNTER__` macro.)
+]
+
+Therefore, this library provides additional macros [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] which can be expanded multiple times on the same line as long as programmers specify a unique identifier as the macro's first parameter.
+The unique identifier can be any token (not just numeric) that can be successfully concatenated by the preprocessor (e.g., `scope_exit_number_1_at_line_123`).
+The second parameter of [macroref BOOST_SCOPE_EXIT_ID] shall be `1` if the macro is used within a template (equivalent to [macroref BOOST_SCOPE_EXIT_TPL]), or `0` otherwise.
+Finally, [macroref BOOST_SCOPE_EXIT_ID] and [macroref BOOST_SCOPE_EXIT_ALL_ID] accept a capture list using the exact same syntax as [macroref BOOST_SCOPE_EXIT] and [macroref BOOST_SCOPE_EXIT_ALL] respectively.
+
+For example (see also [@../../test/same_line.cpp =same_line.cpp=]):
+
+[same_line]
+
+As indicated by the example above, the [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] macros are especially useful when it is necessary to invoke them multiple times within user-defined macros (because the preprocessor expands all nested macros on the same line).
+
+[endsect]
+
 [endsect]
 
 [xinclude reference.xml]

Modified: trunk/libs/scope_exit/test/same_line.cpp
==============================================================================
--- trunk/libs/scope_exit/test/same_line.cpp (original)
+++ trunk/libs/scope_exit/test/same_line.cpp 2012-03-19 22:14:14 EDT (Mon, 19 Mar 2012)
@@ -42,13 +42,13 @@
     int x = 0, delta = 10;
 
     {
- SCOPE_EXIT_INC_DEC(x, delta)
+ SCOPE_EXIT_INC_DEC(x, delta) // Multiple scope exits on same line.
     }
     BOOST_CHECK(x == 0);
 
 #ifndef BOOST_NO_LAMBDAS
     {
- SCOPE_EXIT_ALL_INC_DEC(x, delta)
+ SCOPE_EXIT_ALL_INC_DEC(x, delta) // Multiple scope exits on same line.
     }
     BOOST_CHECK(x == 0);
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk