Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67960 - in sandbox/local/libs/local/doc/html: . boost boost/local boost_local
From: lorcaminiti_at_[hidden]
Date: 2011-01-11 09:23:23


Author: lcaminiti
Date: 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
New Revision: 67960
URL: http://svn.boost.org/trac/boost/changeset/67960

Log:
Added HTML doc.
Added:
   sandbox/local/libs/local/doc/html/
   sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END_RENAME.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_TPL.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost/
   sandbox/local/libs/local/doc/html/boost/local/
   sandbox/local/libs/local/doc/html/boost/local/function_ref.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/
   sandbox/local/libs/local/doc/html/boost_local/Acknowledgments.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Advanced.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Alternatives.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Bibliography.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Examples.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Grammar.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Releases.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Starting.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost_local/Tutorial.html (contents, props changed)
   sandbox/local/libs/local/doc/html/index.html (contents, props changed)
   sandbox/local/libs/local/doc/html/reference.html (contents, props changed)

Added: sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_IDENTITY_TYPE.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_IDENTITY_TYPE</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.utility.identity_hpp" title="Header &lt;boost/utility/identity.hpp&gt;">
+<link rel="prev" href="boost/local/function_ref.html" title="Struct template function_ref">
+<link rel="next" href="BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">
+</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_ref.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_IDENTITY_TYPE"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_IDENTITY_TYPE</span></h2>
+<p>BOOST_IDENTITY_TYPE &#8212; This macro wraps the specified type expression within extra parenthesis so the type can be passed as a single macro parameter even if it contains commas. </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.utility.identity_hpp" title="Header &lt;boost/utility/identity.hpp&gt;">boost/utility/identity.hpp</a>&gt;
+
+</span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div>
+<div class="refsect1">
+<a name="id891480"></a><h2>Description</h2>
+<p>This macro expands to an expression that can be passed as a single macro parameter even if it contains commas and that evaluates to the specified type at compile-time (see the <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section).</p>
+<p>For example <code class="computeroutput">BOOST_IDENTITY_TYPE((std::map&lt;int, double&gt;))</code> can be passed as a single macro parameter when instead <code class="computeroutput">std::map&lt;int, double&gt;</code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">parenthesized_type</code></strong></span></td>
+<td>The type expression to be passed as macro parameter wrapped by a single set of round parenthesis <code class="computeroutput">(...)</code>. This type expression can contain an arbitrary number of commas. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="boost/local/function_ref.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_IDENTITY_VALUE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_IDENTITY_VALUE.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_IDENTITY_VALUE</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.utility.identity_hpp" title="Header &lt;boost/utility/identity.hpp&gt;">
+<link rel="prev" href="BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">
+<link rel="next" href="boost_local/Grammar.html" title="Appendix: Grammar">
+</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_IDENTITY_TYPE.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_local/Grammar.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_IDENTITY_VALUE"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_IDENTITY_VALUE</span></h2>
+<p>BOOST_IDENTITY_VALUE &#8212; This macro wraps the specified value expression within extra parenthesis so the value can be passed as a single macro parameter even if it contains commas. </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.utility.identity_hpp" title="Header &lt;boost/utility/identity.hpp&gt;">boost/utility/identity.hpp</a>&gt;
+
+</span>BOOST_IDENTITY_VALUE(parenthesized_value)</pre></div>
+<div class="refsect1">
+<a name="id891621"></a><h2>Description</h2>
+<p>This macro expands to an expression that can be passed as a single macro parameter even if it contains commas and that evaluates to the specified value at run-time (see the <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section).</p>
+<p>For example <code class="computeroutput">BOOST_IDENTITY_VALUE((key_size&lt;int, double&gt;::value))</code> can be passed as a single macro parameter when instead <code class="computeroutput">key_size&lt;int, double&gt;::value</code> cannot (because it contains a comma not wrapped by round parenthesis so it will be interpreted as two separate macro parameters by the preprocessor).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">parenthesize_value</code></strong></span></td>
+<td>The value expression to be passed as macro parameter wrapped by a single set of round parenthesis <code class="computeroutput">(...)</code>. This value expression can contain an arbitrary number of commas. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_IDENTITY_TYPE.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.utility.identity_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_local/Grammar.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_BLOCK</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">
+<link rel="prev" href="reference.html" title="Reference">
+<link rel="next" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">
+</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="reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_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_BLOCK_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_BLOCK"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_BLOCK</span></h2>
+<p>BOOST_LOCAL_BLOCK &#8212; This macro starts the declaration of a local block. </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.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">boost/local/block.hpp</a>&gt;
+
+</span>BOOST_LOCAL_BLOCK(parenthesized_binding)</pre></div>
+<div class="refsect1">
+<a name="id887875"></a><h2>Description</h2>
+<p>This macro must be used within a declarative context, it must be followed by the local block body code <code class="computeroutput">{ ... }</code> and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></code> macro (see the Tutorial section): </p>
+<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
+ <span class="special">...</span>
+
+ <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span>
+ <span class="identifier">parenthesized_binding</span>
+ <span class="special">)</span> <span class="identifier">exception_specifications_optional</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// Block body.</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+
+ <span class="special">...</span>
+ <span class="special">}</span>
+</pre>
+<p>Within templates, the special macro <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>.</p>
+<p><span class="bold"><strong>Note:</strong></span> A <code class="computeroutput">return;</code> instruction from within a local block body jumps to the end of the local block body and it does not return the enclosing scope.</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">parenthesized_binding</code></strong></span></td>
+<td>A Boost.Preprocessor sequence that uses the parenthesized syntax to specify the variables in scope to bind (see the Grammar section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>As usual, exception specifications can be optionally programmed before the body code block (see the Advanced section).</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section, <a class="link" href="boost_local/Grammar.html" title="Appendix: Grammar">Grammar</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_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; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_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_BLOCK_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_END.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_BLOCK_END</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">
+<link rel="next" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<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_BLOCK_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_BLOCK_END"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_BLOCK_END</span></h2>
+<p>BOOST_LOCAL_BLOCK_END &#8212; This macro ends the definition of a local block. </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.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">boost/local/block.hpp</a>&gt;
+
+</span>BOOST_LOCAL_BLOCK_END</pre></div>
+<div class="refsect1">
+<a name="id888269"></a><h2>Description</h2>
+<p>This macro must follow the local block body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code> documentation.</p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
+</div>
+</div>
+<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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_BLOCK_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_BLOCK_TPL.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,53 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_BLOCK_TPL</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">
+<link rel="next" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">
+</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_BLOCK.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_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_BLOCK_END.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_BLOCK_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_BLOCK_TPL</span></h2>
+<p>BOOST_LOCAL_BLOCK_TPL &#8212; This macro is the same as <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code> but it must be used when declaring local blocks within templates. </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.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">boost/local/block.hpp</a>&gt;
+
+</span>BOOST_LOCAL_BLOCK_TPL(parenthesized_binding)</pre></div>
+<div class="refsect1">
+<a name="id888195"></a><h2>Description</h2>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
+</div>
+</div>
+<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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_BLOCK.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.block_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_BLOCK_END.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,56 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">
+<link rel="next" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html" title="Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<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_BLOCK_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</span></h2>
+<p>BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX &#8212; Maximum number of function parameters supported for the local functions. </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.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">boost/local/config.hpp</a>&gt;
+
+</span>BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</pre></div>
+<div class="refsect1">
+<a name="id888412"></a><h2>Description</h2>
+<p><span class="bold"><strong>Note:</strong></span> If programmers leave this macro undefined, its default value is <code class="computeroutput">5</code>.</p>
+<p>This only refers to the number of local function parameters and not to the number of bound variables in scope (the limit on the number of bound variables is instead the maximum size allowed for a Boost.Preprocessor sequences).</p>
+<p><span class="bold"><strong>Warning:</strong></span> Increasing this number will increase compilation time.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Starting.html" title="Starting">Starting</a> section. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_BLOCK_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">
+<link rel="next" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">
+</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_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</span></h2>
+<p>BOOST_LOCAL_CONFIG_THIS_PARAM_NAME &#8212; The name of the special symbol used to access the bound object <code class="computeroutput">this</code>. </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.config_hpp" title="Header &lt;boost/local/config.hpp&gt;">boost/local/config.hpp</a>&gt;
+
+</span>BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</pre></div>
+<div class="refsect1">
+<a name="id888511"></a><h2>Description</h2>
+<p><span class="bold"><strong>Note:</strong></span> If programmers leave this macro undefined, the default symbol used is <code class="computeroutput">this_</code>.</p>
+<p><span class="bold"><strong>Warning:</strong></span> Programmers should not define this macro unless it is absolutely necessary (e.g., to avoid name clashes with another library which cannot be changed). Changing the symbol <code class="computeroutput">this_</code> effectively changes the public API of this library.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Starting.html" title="Starting">Starting</a> section. </p>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_EXIT</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html" title="Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME">
+<link rel="next" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">
+</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_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_EXIT_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_EXIT"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_EXIT</span></h2>
+<p>BOOST_LOCAL_EXIT &#8212; This macro starts the declaration of a local exit. </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.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">boost/local/exit.hpp</a>&gt;
+
+</span>BOOST_LOCAL_EXIT(parenthesized_binding)</pre></div>
+<div class="refsect1">
+<a name="id888657"></a><h2>Description</h2>
+<p>This macro must be used within a declarative context, it must be followed by the local exit body code <code class="computeroutput">{ ... }</code> and then by the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></code> macro (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section): </p>
+<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
+ <span class="special">...</span>
+
+ <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span>
+ <span class="identifier">parenthesized_binding</span>
+ <span class="special">)</span> <span class="identifier">exception_specifications_optional</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// Block body.</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+
+ <span class="special">...</span>
+ <span class="special">}</span>
+</pre>
+<p>Within templates, the special macro <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>.</p>
+<p><span class="bold"><strong>Note:</strong></span> A <code class="computeroutput">return;</code> instruction from within a local exit body jumps to the end of the local exit body and it does not return the enclosing scope.</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">parenthesized_binding</code></strong></span></td>
+<td>A Boost.Preprocessor sequence that uses the parenthesized syntax to specify the variables in scope to bind (see the <a class="link" href="boost_local/Grammar.html" title="Appendix: Grammar">Grammar</a> section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>As usual, exception specifications can be optionally programmed before the body code block (see the <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section).</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section, <a class="link" href="boost_local/Grammar.html" title="Appendix: Grammar">Grammar</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_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; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_EXIT_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_END.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_EXIT_END</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">
+<link rel="next" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">
+</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_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_FUNCTION.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_EXIT_END"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_EXIT_END</span></h2>
+<p>BOOST_LOCAL_EXIT_END &#8212; This macro ends the definition of a local exit. </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.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">boost/local/exit.hpp</a>&gt;
+
+</span>BOOST_LOCAL_EXIT_END</pre></div>
+<div class="refsect1">
+<a name="id889074"></a><h2>Description</h2>
+<p>This macro must follow the local exit body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code> documentation.</p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
+</div>
+</div>
+<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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_FUNCTION.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_EXIT_TPL.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,53 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_EXIT_TPL</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="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">
+<link rel="next" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">
+</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_EXIT.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_EXIT_END.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_EXIT_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_EXIT_TPL</span></h2>
+<p>BOOST_LOCAL_EXIT_TPL &#8212; This macro is the same as <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code> but it must used when declaring local exits within templates. </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.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">boost/local/exit.hpp</a>&gt;
+
+</span>BOOST_LOCAL_EXIT_TPL(parenthesized_binding)</pre></div>
+<div class="refsect1">
+<a name="id889000"></a><h2>Description</h2>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </p>
+</div>
+</div>
+<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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_EXIT.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.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_LOCAL_EXIT_END.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION</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="Boost.Local 0.1.1">
+<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_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">
+</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_EXIT_END.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_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION</span></h2>
+<p>BOOST_LOCAL_FUNCTION &#8212; This macro starts the declaration of a local function. </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(parenthesized_signature)</pre></div>
+<div class="refsect1">
+<a name="id889233"></a><h2>Description</h2>
+<p>This macro must be used within a declarative context, it must be followed by the local function body code <code class="computeroutput">{ ... }</code> and then by either the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code> or the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code> macro (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> and <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> sections): </p>
+<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some declarative context.</span>
+ <span class="special">...</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="identifier">parenthesized_signature</span>
+ <span class="special">)</span> <span class="identifier">exception_specifications_optional</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// Block body.</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">local_function_name</span><span class="special">)</span>
+
+ <span class="special">...</span>
+ <span class="special">}</span>
+</pre>
+<p>As usual, exception specifications can be optionally programmed before the body code block (see the <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section).</p>
+<p>Within templates, the special macro <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code> 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>.</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">parenthesized_signature</code></strong></span></td>
+<td>A Boost.Preprocessor sequence that uses the parenthesized syntax to specify the local function signature and the variables in scope to bind (see the <a class="link" href="boost_local/Grammar.html" title="Appendix: Grammar">Grammar</a> section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Note:</strong></span> Local functions cannot be copied but it is possible to obtain a reference to a local function using <code class="computeroutput"><a class="link" href="boost/local/function_ref.html" title="Struct template function_ref">boost::local::function_ref</a></code>.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section, <a class="link" href="boost_local/Grammar.html" title="Appendix: Grammar">Grammar</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>, <code class="computeroutput"><a class="link" href="boost/local/function_ref.html" title="Struct template function_ref">boost::local::function_ref</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; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_EXIT_END.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_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_END</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="Boost.Local 0.1.1">
+<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_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">
+</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_END_RENAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_END"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_END</span></h2>
+<p>BOOST_LOCAL_FUNCTION_END &#8212; This macro ends the definition of a local function. </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_END(local_function_name)</pre></div>
+<div class="refsect1">
+<a name="id889720"></a><h2>Description</h2>
+<p>This macro must follow the local function body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> documentation.</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">local_function_name</code></strong></span></td>
+<td>The name of the local function as it has been specified by the parenthesized signature passed to <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> (otherwise, the compiler will generate an error). See the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code> macro to relax this constraint. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</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_END_RENAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END_RENAME.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_END_RENAME.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_END_RENAME</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="Boost.Local 0.1.1">
+<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_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">
+<link rel="next" href="boost/local/function_ref.html" title="Struct template function_ref">
+</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_END.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_ref.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_END_RENAME"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_END_RENAME</span></h2>
+<p>BOOST_LOCAL_FUNCTION_END_RENAME &#8212; This macro ends the definition of a local function while changing the function name. </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_END_RENAME(new_local_function_name)</pre></div>
+<div class="refsect1">
+<a name="id889889"></a><h2>Description</h2>
+<p>This macro must be used instead of the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code> macro and it must follow the local function body code <code class="computeroutput">{ ... }</code> as shown in the <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> documentation.</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">new_local_function_name</code></strong></span></td>
+<td>This is the new local function name (see the <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>The original local function name (as specified by the parenthesized signature passed to <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>) must still be used within the local function body (e.g., for the local function to recursively call itself). However, within the enclosing scope the new local function as passed to <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code> must be used (e.g., to invoke the local function).</p>
+<p><span class="bold"><strong>Warning:</strong></span> Renamed local functions cannot be directly passed as template parameters (e.g., to STL algorithms). However, it is possible to workaround this limitation by getting a reference to the renamed local function using <code class="computeroutput"><a class="link" href="boost/local/function_ref.html" title="Struct template function_ref">boost::local::function_ref</a></code> and then by passing the local function reference as template parameter.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="boost_local/Advanced.html" title="Advanced">Advanced</a> section, <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>, <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_ref.html" title="Struct template function_ref">boost::local::function_ref</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; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_END.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_ref.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_TPL.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,53 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_TPL</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="Boost.Local 0.1.1">
+<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_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">
+</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.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_END.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>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_TPL</span></h2>
+<p>BOOST_LOCAL_FUNCTION_TPL &#8212; This macro is the same as <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code> but it must be used when declaring local functions within templates. </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_TPL(parenthesized_signature)</pre></div>
+<div class="refsect1">
+<a name="id889645"></a><h2>Description</h2>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>, <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a> section. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</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_END.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost/local/function_ref.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost/local/function_ref.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,102 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Struct template function_ref</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="Boost.Local 0.1.1">
+<link rel="up" href="../../reference.html#header.boost.local.function_ref_hpp" title="Header &lt;boost/local/function_ref.hpp&gt;">
+<link rel="prev" href="../../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">
+<link rel="next" href="../../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">
+</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_END_RENAME.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.local.function_ref_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../BOOST_IDENTITY_TYPE.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="boost.local.function_ref"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Struct template function_ref</span></h2>
+<p>boost::local::function_ref &#8212; Template to hold a reference to a local function while supporting eventual default function parameters. </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_ref_hpp" title="Header &lt;boost/local/function_ref.hpp&gt;">boost/local/function_ref.hpp</a>&gt;
+
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> F<span class="special">,</span> <span class="identifier">size_t</span> defaults <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <a class="link" href="function_ref.html" title="Struct template function_ref">function_ref</a> <span class="special">{</span>
+<span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id890337"></a><h2>Description</h2>
+<p>This template defines several specializations to handle a generic number <code class="computeroutput">N</code> of function parameters some of which can have default values. The number of supported function parameters goes from <code class="computeroutput">0</code> (for a function with no parameter) to a maximum of <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code>.</p>
+<p>Each template specialization defines call operators <code class="computeroutput">operator()(...)</code> with a different set of parameters to handle the number of default parameters specified by <code class="computeroutput">defaults</code> (see <a class="link" href="../../boost_local/Advanced.html" title="Advanced">Advanced</a> section): </p>
+<pre class="programlisting"> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Result</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ArgN</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">defaults</span> <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">function_ref</span><span class="special">&lt;</span><span class="identifier">Result</span> <span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">)</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">1</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">)</span><span class="special">;</span>
+ <span class="comment">// Call operators to handle default parameters:</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">1</span><span class="special">)</span><span class="special">;</span> <span class="comment">// iff defaults &gt;= 1</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">)</span><span class="special">;</span> <span class="comment">// iff defaults &gt;= 2</span>
+ <span class="special">...</span> <span class="comment">// etc</span>
+
+ <span class="comment">// Copy constructor and assignment operator for local functions:</span>
+ <span class="identifier">function_ref</span><span class="special">(</span><span class="identifier">local_function</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">)</span><span class="special">;</span>
+ <span class="identifier">function_ref</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">local_function</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">)</span><span class="special">;</span>
+ <span class="special">}</span><span class="special">;</span>
+</pre>
+<p> Where:</p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><p><code class="computeroutput">Result</code> is the function result type. It can be <code class="computeroutput">void</code>.</p></li>
+<li class="listitem"><p><code class="computeroutput">ArgN</code> is the last function parameter type, <code class="computeroutput">ArgN-1</code> is the second last function parameter type, etc. These are all optional (none is specified for a function with no parameter, only <code class="computeroutput">Arg1</code> is specified for a function with only one parameter, etc).</p></li>
+<li class="listitem"><p>The operator <code class="computeroutput">Result operator()(Arg1, ..., ArgN-2, ArgN-1)</code> is defined if and only if there are one or more default parameters (<code class="computeroutput">defaults &gt;= 1</code>), the operator <code class="computeroutput">Result operator()(Arg1, ..., ArgN-2)</code> is defined if and only if there are two or more default parameters (<code class="computeroutput">defaults &gt;= 2</code>), etc.</p></li>
+<li class="listitem"><p><code class="computeroutput">local_function&lt;F, defaults&gt;</code> is an internal type for a local function with a signature matching <code class="computeroutput">F</code> and with a number of default parameters equal to <code class="computeroutput">defaults</code>.</p></li>
+<li class="listitem"><p>The copy constructor and assignment operator <code class="computeroutput">operator=</code> allow to assign this template to a reference to a local function with a signature matching <code class="computeroutput">F</code> and with a number of default parameters equal to <code class="computeroutput">defaults</code>.</p></li>
+</ul></div>
+<p>
+</p>
+<p><span class="bold"><strong>Warning:</strong></span> Programmers must make sure that the local function survives the scope of the function reference (otherwise the reference will be invalid and its use will generate a run-time error as usual with C++ references).</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">F</code></strong></span></td>
+<td>The function signature expressed using the Boost.Function's preferred syntax: <code class="computeroutput">F = Result (Arg1, ..., ArgN)</code>. </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">defaults</code></strong></span></td>
+<td>The number of the function default parameters in <code class="computeroutput">[0,</code> <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code><code class="computeroutput">]</code>. As usual in C++, default parameters are counted starting from the last parameter: <code class="computeroutput">defaults = 0</code> means that no parameter is optional, <code class="computeroutput">defaults = 1</code> means that the last parameter is optional, <code class="computeroutput">defaults = 2</code> means that the last two parameters are optional, etc. </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Note:</strong></span> This template is similar to <code class="computeroutput">boost::function&lt;&gt;</code> but it also supports eventual default parameters.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="../../boost_local/Advanced.html" title="Advanced">Advanced</a> section, <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code>, <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>, Boost.Function. </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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../../BOOST_LOCAL_FUNCTION_END_RENAME.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.local.function_ref_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../BOOST_IDENTITY_TYPE.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Acknowledgments.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Acknowledgments.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,77 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Acknowledgments</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Bibliography.html" title="Bibliography">
+</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="Bibliography.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>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Acknowledgments"></a><a class="link" href="Acknowledgments.html" title="Acknowledgments">Acknowledgments</a>
+</h2></div></div></div>
+<p>
+ This section attempts to recognize the contributions of <span class="emphasis"><em>all</em></span>
+ the different people that participated directly or indirectly to the design
+ and development of this library.
+ </p>
+<p>
+ Thanks to Steven Watanabe and Vicente Botet for suggesting to use Boost.ScopeExit
+ binding to emulate local functions (in the context of constant-correct checking
+ of block invariants).
+ </p>
+<p>
+ Thanks to Alexander Nasonov for clarifying how Boost.ScopeExit
+ binding could be used to implement local functions.
+ </p>
+<p>
+ Thanks to Pierre Morcello for suggesting to use <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code> to exit local blocks (in the context of a
+ discussion about a possible Boost.Breakable
+ library). Thanks to Pierre also for sharing some code that already experimented
+ with implementing local functions using Boost.ScopeExit
+ binding (even if this library was not developed using such a code).
+ </p>
+<p>
+ Thanks to John Bytheway for refining the authors' technique that allows this
+ library to pass local functions as template parameters.
+ </p>
+<p>
+ Thanks to Jeffrey Lee Hellrung for suggesting the use of the "keyword"
+ <code class="computeroutput"><span class="identifier">bind</span></code> to bind variables in scope.
+ </p>
+<p>
+ Finally, many thanks to the entire Boost
+ community and mailing list for
+ providing valuable comments about this library and great insights on the C++
+ programming language.
+ </p>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Bibliography.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>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Advanced.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Advanced.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,1118 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Advanced</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Tutorial.html" title="Tutorial">
+<link rel="next" href="../reference.html" title="Reference">
+</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="Tutorial.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="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Advanced"></a><a class="link" href="Advanced.html" title="Advanced">Advanced</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.commas_in_macro_parameters">Commas
+ in Macro Parameters</a></span></dt>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.recursive_local_functions">Recursive
+ Local Functions</a></span></dt>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.exception_specifications">Exception
+ Specifications</a></span></dt>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.optimizers___inline____auto___and__register_">Optimizers:
+ <code class="computeroutput"><span class="keyword">inline</span></code>, <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.html#boost_local.Advanced.references_to_local_functions">References
+ to Local Functions</a></span></dt>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.renaming_local_functions">Renaming
+ Local Functions</a></span></dt>
+<dt><span class="section"><a href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc">Limitations:
+ Overloading, Nesting, Operators, Etc</a></span></dt>
+</dl></div>
+<p>
+ This section illustrates advanced usages of this library. At the end of this
+ section there is also a list of limitations of this library.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.commas_in_macro_parameters"></a><a class="link" href="Advanced.html#boost_local.Advanced.commas_in_macro_parameters" title="Commas in Macro Parameters">Commas
+ in Macro Parameters</a>
+</h3></div></div></div>
+<p>
+ The C++ preprocessor does not allow commas "<code class="computeroutput"><span class="special">,</span></code>"
+ within macro parameters unless they are wrapped by the round parenthesis
+ <code class="computeroutput"><span class="special">()</span></code>. The elements of the parenthesized
+ signature are internally used as macro parameters while they are being processed
+ by the parsing macros. Therefore, commas within parenthesized signature elements
+ will generate (cryptic) preprocessor errors unless they are wrapped within
+ extra round parenthesis <code class="computeroutput"><span class="special">()</span></code> as
+ explained here.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ <span class="bold"><strong>Macro parameters with commas</strong></span> which are
+ already wrapped by round parenthesis <code class="computeroutput"><span class="special">()</span></code>
+ are fine (function calls, etc). However, macro parameters with commas that
+ are not wrapped by round parenthesis need to be wrapped by an extra set
+ of round parenthesis <code class="computeroutput"><span class="special">()</span></code> as
+ described here. Therefore, also macro parameters with commas wrapped by
+ angular parenthesis <code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ (templates, etc) or square parenthesis <code class="computeroutput"><span class="special">[]</span></code>
+ (multidimensional array access, etc) need to be wrapped by the extra round
+ parenthesis <code class="computeroutput"><span class="special">()</span></code> as explained
+ here (this is because the preprocessor only recognizes the round parenthesis
+ and it does not recognize angular, square, or any other type of parenthesis).
+ </p></td></tr>
+</table></div>
+<p>
+ For example, let's consider the following parenthesized signature (see the
+ complete example code later in this section):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;&amp;)(</span><span class="identifier">m</span><span class="special">)</span> <span class="comment">// (1) Error.
+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_t</span><span class="special">&amp;)(</span><span class="identifier">factor</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">)</span> <span class="comment">// (2) Error.
+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;)(</span><span class="identifier">separator</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="identifier">cat</span><span class="special">(</span><span class="string">":"</span><span class="special">,</span> <span class="string">" "</span><span class="special">))</span> <span class="comment">// (3) OK.
+</span> <span class="special">(::</span><span class="identifier">sign_t</span><span class="special">)(</span><span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(-</span><span class="number">1</span><span class="special">)</span> <span class="comment">// (4) Error.
+</span> <span class="special">)</span>
+</pre>
+<p>
+ <span class="bold"><strong>(1)</strong></span> The parenthesized signature element
+ <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;&amp;</span></code> contains a comma "<code class="computeroutput"><span class="special">,</span></code>" after the first template parameter
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>. This comma is not wrapped by any
+ round parenthesis <code class="computeroutput"><span class="special">()</span></code> (the outer
+ parenthesis <code class="computeroutput"><span class="special">()</span></code> that make this
+ a parenthesized signature element do not count) thus it will cause a preprocessor
+ error. The macro <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a><span class="special">(</span></code><span class="emphasis"><em>parenthesized-type</em></span><code class="computeroutput"><span class="special">)</span></code> can be used to wrap a type within extra
+ parenthesis <code class="computeroutput"><span class="special">()</span></code> so to overcome
+ this issue:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="bold"><strong>(</strong></span><code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code><span class="bold"><strong>((</strong></span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;&amp;</span><span class="bold"><strong>)))</strong></span><span class="special">(</span><span class="identifier">m</span><span class="special">)</span> <span class="comment">// OK.
+</span> <span class="special">...</span>
+ <span class="special">)</span>
+</pre>
+<p>
+ This macro expands to an expression that evaluates (at compile-time) exactly
+ to the specified type. Note that a total of three set of parenthesis <code class="computeroutput"><span class="special">()</span></code> are needed:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Parenthesis to wrap the parenthesized signature element.
+ </li>
+<li class="listitem">
+ Parenthesis to call the <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code>
+ macro.
+ </li>
+<li class="listitem">
+ Parenthesis to wrap the type expression (and therefore any commas "<code class="computeroutput"><span class="special">,</span></code>" that it contains) passed as parameter
+ to the <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code>
+ macro.
+ </li>
+</ol></div>
+<p>
+ <span class="bold"><strong>(2)</strong></span> The parenthesized signature element
+ <code class="computeroutput"><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span></code>
+ contains a comma "<code class="computeroutput"><span class="special">,</span></code>"
+ after the first template parameter <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>.
+ Again, this comma is not wrapped by any parenthesis <code class="computeroutput"><span class="special">()</span></code>
+ so it will cause a preprocessor error. Because this is a value expression
+ (and not a type expression), the macro <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a><span class="special">(</span></code><span class="emphasis"><em>parenthesized-value</em></span><code class="computeroutput"><span class="special">)</span></code> is used to overcome this issue:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="special">...</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_t</span><span class="special">&amp;)(</span><span class="identifier">factor</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
+ <span class="bold"><strong>(</strong></span><code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a></code><span class="bold"><strong>((</strong></span><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="bold"><strong>)))</strong></span> <span class="comment">// OK.
+</span> <span class="special">...</span>
+ <span class="special">)</span>
+</pre>
+<p>
+ This macro expands to an expression that evaluates (at run-time) exactly
+ to the specified value. Note again that a total of three set of parenthesis
+ <code class="computeroutput"><span class="special">()</span></code> are needed similarly to
+ <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code>.
+ </p>
+<p>
+ <span class="bold"><strong>(3)</strong></span> The parenthesized signature element
+ <code class="computeroutput"><span class="identifier">cat</span><span class="special">(</span><span class="char">':'</span><span class="special">,</span> <span class="char">'
+ '</span><span class="special">)</span></code> is instead fine because
+ it contains a comma "<code class="computeroutput"><span class="special">,</span></code>"
+ which is already wrapped by the parenthesis <code class="computeroutput"><span class="special">()</span></code>
+ of the function call <code class="computeroutput"><span class="identifier">cat</span><span class="special">(...)</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>(4)</strong></span> The parenthesized signature elements
+ <code class="computeroutput"><span class="special">::</span><span class="identifier">sign_t</span></code>
+ and <code class="computeroutput"><span class="special">-</span><span class="number">1</span></code>
+ (the type and default value of the <code class="computeroutput"><span class="identifier">sign</span></code>
+ parameter) start with the non-alphanumeric symbols "<code class="computeroutput"><span class="special">::</span></code>"
+ and "<code class="computeroutput"><span class="special">-</span></code>" respectively
+ thus they cannot be used by the parenthesized syntax. The macros <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code> and <code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a></code> can also
+ be used to overcome these issues:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="special">...</span>
+ <span class="special">(</span><code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a></code><span class="special">((::</span><span class="identifier">sign_t</span><span class="special">)))(</span><span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
+ <span class="special">(</span><code class="computeroutput"><a class="link" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a></code><span class="special">((-</span><span class="number">1</span><span class="special">)))</span> <span class="comment">// OK.
+</span> <span class="special">)</span>
+</pre>
+<p>
+ This way the parenthesized signature elements became <code class="computeroutput"><span class="special">(</span><a class="link" href="../BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a><span class="special">((::</span><span class="identifier">sign_t</span><span class="special">)))</span></code>
+ and <code class="computeroutput"><span class="special">(</span><a class="link" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a><span class="special">((-</span><span class="number">1</span><span class="special">)))</span></code>
+ which start with the alphanumeric symbols of the macro names and they can
+ be used by the parenthesized syntax.
+ </p>
+<p>
+ Often, there might be better ways to overcome this limitation that lead to
+ code which is more readable than the one using these macros. For example,
+ in this case the symbol "<code class="computeroutput"><span class="special">::</span></code>"
+ could be dropped and <code class="computeroutput"><span class="special">-</span><span class="number">1</span></code>
+ could be wrapped within <code class="computeroutput"><span class="keyword">int</span><span class="special">(...)</span></code> to obtain the following, more readable,
+ and still valid parenthesized signature code:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="special">...</span>
+ <span class="special">(</span><span class="identifier">sign_t</span><span class="special">)(</span><span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="keyword">int</span><span class="special">(-</span><span class="number">1</span><span class="special">))</span> <span class="comment">// OK.
+</span> <span class="special">)</span>
+</pre>
+<p>
+ Consider the following complete example: <sup>[<a name="id875940" href="#ftn.id875940" class="footnote">15</a>]</sup>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">identity</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">K</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">key_size</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">value</span><span class="special">;</span> <span class="special">};</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">K</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="special">=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">K</span><span class="special">);</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">cat</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">a</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">b</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="identifier">b</span><span class="special">;</span> <span class="special">}</span>
+
+<span class="keyword">typedef</span> <span class="keyword">int</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">sign_t</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span>
+ <span class="comment">// Identity macors handle commas.
+</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;&amp;)))(</span><span class="identifier">m</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_t</span><span class="special">&amp;)(</span><span class="identifier">factor</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">BOOST_IDENTITY_VALUE</span><span class="special">((</span><span class="identifier">key_size</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">)))</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;)(</span><span class="identifier">separator</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="identifier">cat</span><span class="special">(</span><span class="string">":"</span><span class="special">,</span> <span class="string">" "</span><span class="special">))</span>
+ <span class="comment">// Also, identity macors handle leading symbols.
+</span> <span class="special">(</span><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((::</span><span class="identifier">sign_t</span><span class="special">)))(</span><span class="identifier">sign</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">BOOST_IDENTITY_VALUE</span><span class="special">((-</span><span class="number">1</span><span class="special">)))</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;::</span><span class="identifier">const_iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">m</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span><span class="special">-&gt;</span><span class="identifier">first</span> <span class="special">&lt;&lt;</span> <span class="identifier">separator</span> <span class="special">&lt;&lt;</span>
+ <span class="identifier">sign</span> <span class="special">*</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">i</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">)</span> <span class="special">*</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">factor</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">print</span><span class="special">)</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">size_t</span><span class="special">&gt;</span> <span class="identifier">sizes</span><span class="special">;</span>
+ <span class="identifier">sizes</span><span class="special">[</span><span class="string">"a"</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">sizes</span><span class="special">[</span><span class="string">"ab"</span><span class="special">]</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="identifier">sizes</span><span class="special">[</span><span class="string">"abc"</span><span class="special">]</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
+ <span class="identifier">print</span><span class="special">(</span><span class="identifier">sizes</span><span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.recursive_local_functions"></a><a class="link" href="Advanced.html#boost_local.Advanced.recursive_local_functions" title="Recursive Local Functions">Recursive
+ Local Functions</a>
+</h3></div></div></div>
+<p>
+ A local function can recursively call itself as usual with C++ functions.
+ </p>
+<p>
+ For example, the following local function is used to recursively calculate
+ and print the factorial of the specified numbers:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">sstream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span> <span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span>
+ <span class="identifier">v</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+ <span class="identifier">v</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="number">7</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostringstream</span> <span class="identifier">factorials</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">factorial</span><span class="special">)(</span>
+ <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">n</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">bool</span><span class="special">)(</span><span class="identifier">recursion</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="keyword">false</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">factorials</span><span class="special">))</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">result</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">n</span> <span class="special">&lt;</span> <span class="number">2</span> <span class="special">)</span> <span class="identifier">result</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
+ <span class="keyword">else</span> <span class="identifier">result</span> <span class="special">=</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">,</span> <span class="keyword">true</span><span class="special">);</span> <span class="comment">// Recursive call.
+</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">recursion</span><span class="special">)</span> <span class="identifier">factorials</span> <span class="special">&lt;&lt;</span> <span class="identifier">result</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">factorial</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">factorials</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The original local function name as specified in the parenthesized signature
+ passed to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ must always be used for recursive calls even when the function is renamed
+ using <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ (see renamed local functions later in this section).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.exception_specifications"></a><a class="link" href="Advanced.html#boost_local.Advanced.exception_specifications" title="Exception Specifications">Exception
+ Specifications</a>
+</h3></div></div></div>
+<p>
+ It is possible to program exception specifications for local functions, local
+ blocks, and local exits.
+ </p>
+<p>
+ Exception specifications are programmed just before the body (and outside
+ the macros). For example:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">stdexcept</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="keyword">throw</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">logic_error</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Throw two exceptions.
+</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_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="comment">// Throw nothing.
+</span> <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">size</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">nums</span><span class="special">))</span> <span class="special">)</span> <span class="keyword">throw</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
+
+ <span class="comment">// Throw one exception.
+</span> <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span> <span class="keyword">throw</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">exception</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.optimizers___inline____auto___and__register_"></a><a class="link" href="Advanced.html#boost_local.Advanced.optimizers___inline____auto___and__register_" title="Optimizers: inline, auto, and register">Optimizers:
+ <code class="computeroutput"><span class="keyword">inline</span></code>, <code class="computeroutput"><span class="keyword">auto</span></code>,
+ and <code class="computeroutput"><span class="keyword">register</span></code></a>
+</h3></div></div></div>
+<p>
+ As specified in the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section,
+ the parenthesized signature also supports <code class="computeroutput"><span class="keyword">inline</span></code>d
+ local functions, and the <code class="computeroutput"><span class="keyword">auto</span></code>
+ and <code class="computeroutput"><span class="keyword">register</span></code> classifiers for
+ local function parameters.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ However, note that local functions will always add some overhead because
+ of the functor object used to internally implement them. Compilers might
+ not be able to optimize away the local function overhead even when <code class="computeroutput"><span class="keyword">inline</span></code>, <code class="computeroutput"><span class="keyword">auto</span></code>,
+ and <code class="computeroutput"><span class="keyword">register</span></code> are used.
+ </p></td></tr>
+</table></div>
+<p>
+ For example:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">inline</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="comment">// Inlined local function.
+</span> <span class="special">(</span><span class="keyword">auto</span><span class="special">)(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="comment">// Auto parameter.
+</span> <span class="special">(</span><span class="keyword">register</span><span class="special">)(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)</span> <span class="comment">// Register parameter.
+</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">add</span><span class="special">(</span><span class="number">3</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.references_to_local_functions"></a><a class="link" href="Advanced.html#boost_local.Advanced.references_to_local_functions" title="References to Local Functions">References
+ to Local Functions</a>
+</h3></div></div></div>
+<p>
+ It is possible to obtain a reference to a local function so to assign it
+ to a variable, to pass it as a function parameter, etc.
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Local functions are never copied by value. You can only obtain a reference
+ to a local function therefore you need to make sure that the <span class="bold"><strong>local function survives the scope of its reference</strong></span>
+ otherwise the reference will be invalid and its use will generate a run-time
+ error (as usual with C++ references). <sup>[<a name="id880460" href="#ftn.id880460" class="footnote">16</a>]</sup>
+ </p></td></tr>
+</table></div>
+<p>
+ For this purpose, it is possible to assign a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span></code>
+ functor to a local function (see also Boost.Function).
+ However, it is in general preferable to use the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code>
+ functor instead because its API also supports default parameters.
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> template
+ takes two parameters (see the Reference
+ section):
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">defaults</span> <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
+</pre>
+<p>
+ Where:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ The template parameter <code class="computeroutput"><span class="identifier">F</span></code>
+ specifies the function signature using the same syntax as Boost.Function's
+ preferred syntax. For example:
+ </li></ul></div>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">()</span> <span class="special">&gt;</span> <span class="comment">// Returns `int` and takes no parameter.
+</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// Returns `int`and takes two parameters: a `double` followed by a `char`.
+</span></pre>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ The template parameter <code class="computeroutput"><span class="identifier">defaults</span></code>
+ specifies the number of defaults parameters counting from the last parameter:
+ <code class="computeroutput"><span class="number">0</span></code> if no parameter is optional,
+ <code class="computeroutput"><span class="number">1</span></code> if the last parameter is
+ optional, <code class="computeroutput"><span class="number">2</span></code> if the last two
+ parameters are optional, etc. This template parameter must be between
+ <code class="computeroutput"><span class="number">0</span></code> and the total number of
+ parameters as specified by <code class="computeroutput"><span class="identifier">F</span></code>.
+ This template parameter is optional and it is <code class="computeroutput"><span class="number">0</span></code>
+ by default. For example:
+ </li></ul></div>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// No default: All parameters must be specified.
+</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">1</span> <span class="special">&gt;</span> <span class="comment">// 1 default: The last `char` parameter is optional.
+</span><code class="computeroutput"><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code><span class="special">&lt;</span> <span class="keyword">int</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="comment">// 2 defaults: All parameters are optional.
+</span></pre>
+<p>
+ For example:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function_ref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="comment">// Using `function_ref` allows to use the same functor for all calls
+</span><span class="comment">// (regardless of which set of default parameters is specified).
+</span><span class="keyword">void</span> <span class="identifier">doit</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">function_ref</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="comment">// Using `function` requires different functors for calls with different set of
+</span><span class="comment">// default parameters.
+</span><span class="keyword">void</span> <span class="identifier">doit2</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">)</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span>
+ <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
+<span class="keyword">void</span> <span class="identifier">doit1</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">l</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
+<span class="keyword">void</span> <span class="identifier">doit0</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="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">l</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</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">l2</span><span class="special">;</span>
+
+ <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">linear</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">1</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">2</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">)(</span> <span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">+</span> <span class="identifier">i</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">linear</span><span class="special">)</span>
+
+ <span class="comment">// Assign local functions variables.
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">function_ref</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">),</span> <span class="number">2</span> <span class="special">&gt;</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">;</span>
+ <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span> <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span> <span class="identifier">l</span><span class="special">();</span> <span class="comment">// All calls because of default parameters.
+</span> <span class="identifier">l2</span> <span class="special">=</span> <span class="identifier">linear</span><span class="special">;</span>
+ <span class="identifier">l2</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span> <span class="comment">// Only one call operation (without default parameters).
+</span>
+ <span class="comment">// Similarly, pass local functions as a function parameter.
+</span> <span class="identifier">doit</span><span class="special">(</span><span class="identifier">linear</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">doit2</span><span class="special">(</span><span class="identifier">linear</span><span class="special">);</span>
+ <span class="identifier">doit1</span><span class="special">(</span><span class="identifier">linear</span><span class="special">);</span>
+ <span class="identifier">doit0</span><span class="special">(</span><span class="identifier">linear</span><span class="special">);</span>
+ <span class="special">}</span>
+
+ <span class="keyword">if</span> <span class="special">(</span><span class="keyword">false</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">l2</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span> <span class="comment">// This wouuld raise run-time error because invalid reference.
+</span> <span class="special">}</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.renaming_local_functions"></a><a class="link" href="Advanced.html#boost_local.Advanced.renaming_local_functions" title="Renaming Local Functions">Renaming
+ Local Functions</a>
+</h3></div></div></div>
+<p>
+ Local functions can be renamed using the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ macro instead of <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>:
+ </p>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code><span class="special">(</span><span class="emphasis"><em>new-local-function-name</em></span><span class="special">)</span>
+</pre>
+<p>
+ Where the <span class="emphasis"><em>new-local-function-name</em></span> no longer has to match
+ the local function name as originally specified in the parenthesized signature
+ passed to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>.
+ For example: <sup>[<a name="id883162" href="#ftn.id883162" class="footnote">17</a>]</sup>
+ </p>
+<pre class="programlisting"><span class="special">{</span>
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// Body uses original name `l`.
+</span> <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span> <span class="comment">// Renamed to `m`.
+</span>
+ <span class="special">...</span> <span class="comment">// Enclosing scope uses new name `m`.
+</span><span class="special">}</span>
+</pre>
+<p>
+ Note that the local function is renamed only after the call to <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>.
+ Therefore, within the local function body the original local function name
+ as specified by <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ must be used (e.g., to recursively call the local function). However, within
+ the enclosing scope only the new local function name as specified by <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ is available.
+ </p>
+<p>
+ A limitation is that renamed local functions cannot be directly passed as
+ template parameters (e.g., they cannot be passed to STL algorithms like
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>). However, it is possible to workaround
+ this limitation by obtaining a reference of the renamed local function and
+ then passing the reference as template parameter. For example:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function_ref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">print</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Only original `print` name available within local function body.
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">x</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END_RENAME</span><span class="special">(</span><span class="identifier">new_print</span><span class="special">)</span>
+ <span class="comment">// Only new `new_print` name available within enclosing scope.
+</span>
+ <span class="keyword">int</span> <span class="identifier">a</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">=</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="number">3</span><span class="special">};</span>
+
+ <span class="comment">// std::for_each(a, a + 3, new_print); // Error: Passing renamed function.
+</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">function_ref</span><span class="special">&lt;</span> <span class="keyword">void</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;</span> <span class="identifier">print_ref</span> <span class="special">=</span> <span class="identifier">new_print</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">a</span><span class="special">,</span> <span class="identifier">a</span> <span class="special">+</span> <span class="number">3</span><span class="special">,</span> <span class="identifier">print_ref</span><span class="special">);</span> <span class="comment">// OK: Passing function reference.
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<a name="boost_local.Advanced.renaming_local_functions.motivation"></a><h6>
+<a name="id884109"></a>
+ <a class="link" href="Advanced.html#boost_local.Advanced.renaming_local_functions.motivation">Motivation</a>
+ </h6>
+<p>
+ The motivation for renaming a local function might not be obvious at first.
+ In fact, in most cases programmers will not need to rename local functions.
+ </p>
+<p>
+ Renaming local functions might be useful at least to program macros that
+ expand using local functions and that do not want to pass the local function
+ body as a macro parameter (so to retain the usual meaning of compiler error
+ line numbers for the body code). Consider the following example that implements
+ a simple version of the local exit macros using a renamed local function:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function_ref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">preprocessor</span><span class="special">/</span><span class="identifier">cat</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">EXIT</span><span class="special">(</span><span class="identifier">parenthesized_binding</span><span class="special">)</span> <span class="special">\</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">\</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">exit_code</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))(</span> <span class="identifier">parenthesized_binding</span> <span class="special">)</span> <span class="special">\</span>
+ <span class="special">)</span> <span class="comment">/* followed by exit body here */</span>
+
+<span class="comment">// Local function renaming is necessary because `__LINE__` has a different
+</span><span class="comment">// value when `EXIT_END` macro expands respect to its value when the `EXIT()`
+</span><span class="comment">// macro expands.
+</span><span class="preprocessor">#define</span> <span class="identifier">EXIT_END</span> <span class="special">\</span>
+ <span class="comment">/* preceded by exit body here */</span> <span class="special">\</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION_END_RENAME</span><span class="special">(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">exit_code</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span> <span class="special">\</span>
+ <span class="identifier">exit_guard</span> <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">exit_guardian</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)(</span> <span class="special">\</span>
+ <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">exit_code</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">));</span>
+
+<span class="keyword">struct</span> <span class="identifier">exit_guard</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">function_ref</span><span class="special">&lt;</span> <span class="keyword">void</span> <span class="special">()</span> <span class="special">&gt;</span> <span class="identifier">ref_type</span><span class="special">;</span>
+ <span class="keyword">explicit</span> <span class="identifier">exit_guard</span><span class="special">(</span><span class="identifier">ref_type</span> <span class="identifier">ref</span><span class="special">):</span> <span class="identifier">ref_</span><span class="special">(</span><span class="identifier">ref</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="special">~</span><span class="identifier">exit_guard</span><span class="special">()</span> <span class="special">{</span> <span class="identifier">ref_</span><span class="special">();</span> <span class="special">}</span> <span class="comment">// Execute local function code at scope exit.
+</span><span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">ref_type</span> <span class="identifier">ref_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">int</span><span class="special">*</span> <span class="identifier">a</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">int</span><span class="special">[</span><span class="number">3</span><span class="special">];</span>
+ <span class="identifier">EXIT</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">a</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Body outside macros so retain complier error meaning.
+</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">EXIT_END</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc"></a><a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc" title="Limitations: Overloading, Nesting, Operators, Etc">Limitations:
+ Overloading, Nesting, Operators, Etc</a>
+</h3></div></div></div>
+<p>
+ This is a list of limitations of this library's local functions compared
+ to usual features of C++ functions.
+ </p>
+<a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.overloading"></a><h6>
+<a name="id885100"></a>
+ <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.overloading">Overloading</a>
+ </h6>
+<p>
+ It is not possible to overload local functions. Declaring multiple local
+ functions with the same name within the same enclosing scope generates a
+ compile-time error (even if the different declarations specify different
+ parameters). <sup>[<a name="id885120" href="#ftn.id885120" class="footnote">18</a>]</sup>
+ </p>
+<p>
+ For example, the following code will <span class="bold"><strong>not</strong></span>
+ compile:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{</span>
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">d</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">d</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span> <span class="comment">// Error: Cannot overload.
+</span>
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.nesting"></a><h6>
+<a name="id885584"></a>
+ <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.nesting">Nesting</a>
+ </h6>
+<p>
+ It is not possible to nest local functions, local blocks, or local exits
+ within each other. Nesting will generate a compile-time error. <sup>[<a name="id885606" href="#ftn.id885606" class="footnote">19</a>]</sup>
+ </p>
+<p>
+ For example, the following code will <span class="bold"><strong>not</strong></span>
+ compile:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{</span>
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="comment">// Error: Cannot nest.
+</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">m</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)(</span><span class="identifier">j</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">j</span> <span class="special">*</span> <span class="number">10</span><span class="special">;</span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">m</span><span class="special">)</span>
+
+ <span class="keyword">return</span> <span class="identifier">m</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">*</span> <span class="number">10</span><span class="special">;</span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.operators"></a><h6>
+<a name="id886028"></a>
+ <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.operators">Operators</a>
+ </h6>
+<p>
+ Local functions cannot be operators. Naming a local function <code class="computeroutput"><span class="keyword">operator</span><span class="special">...</span></code>
+ will generate a compile-time error. <sup>[<a name="id886065" href="#ftn.id886065" class="footnote">20</a>]</sup>
+ </p>
+<p>
+ For example, the following code will <span class="bold"><strong>not</strong></span>
+ compile:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">point</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">x</span><span class="special">;</span>
+ <span class="keyword">double</span> <span class="identifier">y</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="comment">// Error: Cannot be `operator==`.
+</span> <span class="special">(</span><span class="keyword">bool</span><span class="special">)</span> <span class="special">(</span><span class="keyword">operator</span><span class="special">==)(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">point</span><span class="special">&amp;)(</span><span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">point</span><span class="special">&amp;)(</span><span class="identifier">q</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">x</span> <span class="special">==</span> <span class="identifier">q</span><span class="special">.</span><span class="identifier">x</span> <span class="special">&amp;&amp;</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">y</span> <span class="special">==</span> <span class="identifier">q</span><span class="special">.</span><span class="identifier">y</span><span class="special">;</span>
+ <span class="special">)</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="keyword">operator</span><span class="special">==)</span>
+
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<a name="boost_local.Advanced.limitations__overloading__nesting__operators__etc.etc"></a><h6>
+<a name="id886471"></a>
+ <a class="link" href="Advanced.html#boost_local.Advanced.limitations__overloading__nesting__operators__etc.etc">Etc</a>
+ </h6>
+<p>
+ Some usual C++ function features like <code class="computeroutput"><span class="keyword">inline</span></code>
+ and default parameters are supported for local functions while other features
+ are not supported. The parenthesized syntax itself (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section) could be extended to support <span class="emphasis"><em>all</em></span> C++ function
+ features even with the addition of concepts and named parameters (see Contract++):
+ </p>
+<pre class="programlisting"><span class="emphasis"><em>parenthesized-signature:</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">export</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">template</span><span class="special">)(</span><span class="emphasis"><em>template-parameter-list</em></span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="identifier">requires</span><span class="special">)(</span><span class="emphasis"><em>concept-list</em></span><span class="special">)</span><span class="emphasis"><em>]</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">explicit</span><span class="special">)</span><span class="emphasis"><em>]</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">inline</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">extern</span><span class="special">)</span><span class="emphasis"><em>]</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">static</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">virtual</span><span class="special">)</span><span class="emphasis"><em>]</em></span>
+ <span class="special">(</span><span class="emphasis"><em>result-type</em></span><span class="special">)</span> <span class="special">(</span><span class="emphasis"><em>function-name</em></span><span class="special">)(</span><span class="emphasis"><em>parameter-list</em></span><span class="special">)</span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">const</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">volatile</span><span class="special">)</span><span class="emphasis"><em>]</em></span>
+</pre>
+<p>
+ However, not all these features apply to local functions:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ C++ Function Feature
+ </p>
+ </th>
+<th>
+ <p>
+ Local Function Support
+ </p>
+ </th>
+<th>
+ <p>
+ Rationale
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">export</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions cannot be templates
+ (plus most C++ compilers do not implement <code class="computeroutput"><span class="keyword">export</span></code>).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">template</span><span class="special">)(</span></code><span class="emphasis"><em>template-parameter-list</em></span><code class="computeroutput"><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are implemented using
+ local classes and C++ local classes cannot be templates.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="identifier">requires</span><span class="special">)(</span></code><span class="emphasis"><em>concept-list</em></span><code class="computeroutput"><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This library could internally use Boost.ConceptCheck
+ to check the concepts specified by using the parenthesized syntax.
+ However, concept checking is not supported because local functions
+ cannot be templates.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">explicit</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are not constructors.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">inline</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes
+ </p>
+ </td>
+<td>
+ <p>
+ This is supported (see the <a class="link" href="Advanced.html" title="Advanced">Advanced</a>
+ section).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">extern</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are always defined
+ locally within the enclosing scope and together with their declarations.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">static</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are not member functions.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="keyword">virtual</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are not member functions.
+ </p>
+ <p>
+ In theory, it would be possible for a local functor class to inherit
+ from another local functor class. The parenthesized syntax could
+ be extended to specify the eventual base local functor class within
+ the parenthesized signature (e.g., using <code class="computeroutput"><span class="special">...</span>
+ <span class="special">(</span><span class="identifier">extends</span><span class="special">)(</span></code><span class="emphasis"><em>base</em></span><code class="computeroutput"><span class="special">)</span></code>). However, this "inheritance"
+ feature is not implemented because it seems of <a href="http://lists.boost.org/Archives/boost/2010/09/170895.php" target="_top">no
+ use</a> given that local functions can be bound to one another
+ thus they can simply call each other directly without recurring
+ to dynamic binding or base function call.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span></code><span class="emphasis"><em>result-type</em></span><code class="computeroutput"><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes
+ </p>
+ </td>
+<td>
+ <p>
+ This is supported (see the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
+ section).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span></code><span class="emphasis"><em>function-name</em></span><code class="computeroutput"><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes
+ </p>
+ </td>
+<td>
+ <p>
+ This is supported but it cannot be overloaded and it cannot be
+ an operator (see the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
+ and <a class="link" href="Advanced.html" title="Advanced">Advanced</a> sections).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span></code><span class="emphasis"><em>parameter-list</em></span><code class="computeroutput"><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes
+ </p>
+ </td>
+<td>
+ <p>
+ This is supported and it also supports the <code class="computeroutput"><span class="keyword">auto</span></code>
+ and <code class="computeroutput"><span class="keyword">register</span></code> parameter
+ classifiers, default parameters, and binding of variables in scope
+ (see the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a> and
+ <a class="link" href="Advanced.html" title="Advanced">Advanced</a> sections).
+ </p>
+ <p>
+ In addition, the parenthesized syntax could support named parameters
+ introducing the "keywords" <code class="computeroutput"><span class="special">(</span><span class="identifier">in</span><span class="special">)</span></code>,
+ <code class="computeroutput"><span class="special">(</span><span class="identifier">out</span><span class="special">)</span></code>, <code class="computeroutput"><span class="special">(</span><span class="identifier">inout</span><span class="special">)</span></code>,
+ and then using Boost.Paramater
+ to internally implement named parameters. However, local functions
+ cannot be templates so they cannot be used with Boost.Paramater
+ thus named parameters are not supported for local functions.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Trailing <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are not member functions.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Trailing <code class="computeroutput"><span class="special">(</span><span class="keyword">volatile</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+<td>
+ <p>
+ This is not supported because local functions are not member functions.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.id875940" href="#id875940" class="para">15</a>] </sup>
+ We recognize that the use of the <span class="emphasis"><em>identity macros</em></span> adds
+ extra parenthesis to the already significant number of parenthesis required
+ by the parenthesized syntax. However, parenthesized signatures usually
+ do not contain unwrapped commas "<code class="computeroutput"><span class="special">,</span></code>"
+ (unless template metaprogramming is being used).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id880460" href="#id880460" class="para">16</a>] </sup>
+ The suffix <code class="computeroutput"><span class="identifier">ref</span></code> of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><a class="link" href="../boost/local/function_ref.html" title="Struct template function_ref">function_ref</a></code> is meant
+ to help programmers remember that they are dealing with references to
+ (and not copies of) local functions.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id883162" href="#id883162" class="para">17</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> Local functions are often named
+ <code class="computeroutput"><span class="identifier">l</span></code> in the casual examples
+ of this documentation because the name of the author starts with the letter
+ "<code class="computeroutput"><span class="identifier">l</span></code>". <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span>
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id885120" href="#id885120" class="para">18</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This is because a local function
+ is a functor object declared as a local variable within the enclosing scope.
+ Therefore, declaring two local functions with the same name within the
+ same enclosing scope declares two local variables with the same name within
+ the same scope and that is not allowed in C++.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id885606" href="#id885606" class="para">19</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This is because within a nested
+ code block only global or static variables can be accessed while Boost.ScopeExit
+ variable <a href="http://lists.boost.org/Archives/boost/2006/11/113658.php" target="_top">binding
+ mechanism</a> requires to access local variables that hold the bound
+ variables.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id886065" href="#id886065" class="para">20</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This is the because a local
+ function name must be a valid local variable name (the local variable to
+ hold the local functor object) and operators cannot be used as local variable
+ names.
+ </p></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Tutorial.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="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Alternatives.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Alternatives.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,261 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Appendix: Alternatives</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Grammar.html" title="Appendix: Grammar">
+<link rel="next" href="Examples.html" title="Appendix: Examples">
+</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="Grammar.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="Examples.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Alternatives"></a><a class="link" href="Alternatives.html" title="Appendix: Alternatives">Appendix: Alternatives</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Local Functions</span></dt>
+<dt><span class="section">Local Blocks</span></dt>
+<dt><span class="section">Local Exits</span></dt>
+</dl></div>
+<p>
+ This section compares the features offered by this library with similar features
+ offered by other libraries and by the new C++0x standard.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Alternatives.local_functions"></a><a class="link" href="Alternatives.html#boost_local.Alternatives.local_functions" title="Local Functions">Local Functions</a>
+</h3></div></div></div>
+<p>
+ The following table compares local function features.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Local Function Feature
+ </p>
+ </th>
+<th>
+ <p>
+ This Library
+ </p>
+ </th>
+<th>
+ <p>
+ Local Classes
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ lambda</a>
+ </p>
+ </th>
+<th>
+ <p>
+ Boost.Lambda
+ </p>
+ </th>
+<th>
+ <p>
+ Boost.Phoenix
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <span class="emphasis"><em>Program body using usual C++ syntax</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ No.
+ </p>
+ </td>
+<td>
+ <p>
+ No.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="emphasis"><em>Can be passed as template parameter (e.g., to STL algorithms)</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ No (see "local class" in [StroustupGlossary]).
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="emphasis"><em>Bind variables in scope</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Yes, bind by value, constant value, reference, and constant reference
+ (also bind the object <code class="computeroutput"><span class="keyword">this</span></code>).
+ </p>
+ </td>
+<td>
+ <p>
+ No.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes, but no bind by constant (value or reference).
+ </p>
+ </td>
+<td>
+ <p>
+ No.
+ </p>
+ </td>
+<td>
+ <p>
+ No.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="emphasis"><em>Can be defined within expressions</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ No, defined only within declarations.
+ </p>
+ </td>
+<td>
+ <p>
+ No, defined only within declarations.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+<td>
+ <p>
+ Yes.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Alternatives.local_blocks"></a><a class="link" href="Alternatives.html#boost_local.Alternatives.local_blocks" title="Local Blocks">Local Blocks</a>
+</h3></div></div></div>
+<p>
+ The authors know of no other library or language feature that supports local
+ blocks (i.e., with the ability to bind by constant value or reference).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Alternatives.local_exits"></a><a class="link" href="Alternatives.html#boost_local.Alternatives.local_exits" title="Local Exits">Local Exits</a>
+</h3></div></div></div>
+<p>
+ This library local exits provide a functionality very similar to the one
+ provided by Boost.ScopeExit
+ but with the following additional features:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Bind by constant (value or reference).
+ </li>
+<li class="listitem">
+ Bind the object <code class="computeroutput"><span class="keyword">this</span></code>.
+ </li>
+</ul></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Grammar.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="Examples.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Bibliography.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Bibliography.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Bibliography</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Releases.html" title="Releases">
+<link rel="next" href="Acknowledgments.html" title="Acknowledgments">
+</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="Releases.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="Acknowledgments.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Bibliography"></a><a class="link" href="Bibliography.html" title="Bibliography">Bibliography</a>
+</h2></div></div></div>
+<p>
+ This section lists all the bibliographic references cited by this documentation.
+ </p>
+<p>
+ [N2511]
+ Alisdair Meredith. <span class="emphasis"><em>Named Lambdas and Local Functions.</em></span>
+ The C++ Standards Committee, document no. N2511=08-0021, 2008.
+ </p>
+<p>
+ [N2529]
+ Jaakko Jarvi, John Freeman, Lawrence Crowl. <span class="emphasis"><em>Lambda Expressions and
+ Closures: Wording for Monomorphic Lambdas (Revision 3).</em></span> The C++
+ Standards Committee, document no. N2529=08-0039, 2008.
+ </p>
+<p>
+ [N2550]
+ Jaakko Jarvi, John Freeman, Lawrence Crowl. <span class="emphasis"><em>Lambda Expressions and
+ Closures: Wording for Monomorphic Lambdas (Revision 4).</em></span> The C++
+ Standards Committee, document no. N2550=08-0060, 2008.
+ </p>
+<p>
+ [StroustupGlossary]
+ Bjarne Stroustrup. <span class="emphasis"><em>Bjarne Stroustrup's C++ Glossary.</em></span>
+ </p>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Releases.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="Acknowledgments.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Examples.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Examples.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,239 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Appendix: Examples</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Alternatives.html" title="Appendix: Alternatives">
+<link rel="next" href="Releases.html" title="Releases">
+</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="Alternatives.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="Releases.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Examples"></a><a class="link" href="Examples.html" title="Appendix: Examples">Appendix: Examples</a>
+</h2></div></div></div>
+<p>
+ This section lists the complete source code of some examples that can be compiled
+ and executed using this library (see also the many examples listed within the
+ text of this documentation).
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Adapted From
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Source File(s)
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Boost.ScopeExit
+ documentation
+ </p>
+ </td>
+<td>
+ <p>
+ Local Exit
+ </p>
+ </td>
+<td>
+ <p>
+ Local exits with user defined types registered using Boost.Typeof.
+ </p>
+ </td>
+<td>
+ <p>
+ exit.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ STL Transform
+ </p>
+ </td>
+<td>
+ <p>
+ Bind a local function to another local function.
+ </p>
+ </td>
+<td>
+ <p>
+ transform.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ [N2550]
+ </p>
+ </td>
+<td>
+ <p>
+ STL Find
+ </p>
+ </td>
+<td>
+ <p>
+ Pass a local function to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ find_if.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ [N2529]
+ </p>
+ </td>
+<td>
+ <p>
+ Bind This
+ </p>
+ </td>
+<td>
+ <p>
+ Bind object <code class="computeroutput"><span class="keyword">this</span></code> to
+ a local function.
+ </p>
+ </td>
+<td>
+ <p>
+ this.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ Local Block
+ </p>
+ </td>
+<td>
+ <p>
+ Local blocks with biding (constant, non-constant, and <code class="computeroutput"><span class="keyword">this</span></code>) and <code class="computeroutput"><span class="keyword">return</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ block.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ Parameters Permutations
+ </p>
+ </td>
+<td>
+ <p>
+ Exhaustively shows all possible parameter permutations (with/without
+ parameters, with/without binding constant and not, with/without
+ <code class="computeroutput"><span class="keyword">this</span></code> binding constant
+ and not).
+ </p>
+ </td>
+<td>
+ <p>
+ params.cpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ Same Line
+ </p>
+ </td>
+<td>
+ <p>
+ Two local functions defined on the same line of code.
+ </p>
+ </td>
+<td>
+ <p>
+ same_line.cpp
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Alternatives.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="Releases.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Grammar.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Grammar.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,200 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Appendix: Grammar</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="../BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">
+<link rel="next" href="Alternatives.html" title="Appendix: 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_IDENTITY_VALUE.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="Alternatives.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Grammar"></a><a class="link" href="Grammar.html" title="Appendix: Grammar">Appendix: Grammar</a>
+</h2></div></div></div>
+<p>
+ This section describes the complete grammar of the <span class="emphasis"><em>parenthesized
+ syntax</em></span> used by this library to specify the local function signature
+ with binding of variables in scope.
+ </p>
+<p>
+ This should be considered a reference section. See the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
+ and the <a class="link" href="Advanced.html" title="Advanced">Advanced</a> sections for explanations
+ and examples on how to use the parenthesized syntax.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ The parsers of the parenthesized syntax are implemented using macros and
+ the Boost.Preprocessor
+ library so <span class="bold"><strong>the parenthesized syntax is parsed by the
+ preprocessor</strong></span>.
+ </p>
+<p>
+ Using preprocessor metaprogramming allows the parsers to introduce new "keywords"
+ at the same syntactic level as the usual C++ keywords but that are used to
+ support new features specific to this library (for example the new "keyword"
+ <code class="computeroutput"><span class="identifier">bind</span></code> which is used to bind
+ variables in scope). However, the use of the preprocessor also requires using
+ a significant number of extra parenthesis <code class="computeroutput"><span class="special">()</span></code>
+ with respect to usual C++ syntax (from which the parenthesized syntax's name).
+ </p>
+<p>
+ In addition, there is only a limited amount of syntactic error checking that
+ can be done using macros thus sometimes a parenthesized syntax error generates
+ cryptic preprocessor errors. When the macros can catch syntactic errors,
+ these errors are reported as compile-time errors (using static assertions)
+ with names of the form <code class="computeroutput"><span class="identifier">ERROR_</span></code><span class="emphasis"><em>description_text</em></span>.
+ </p>
+</td></tr>
+</table></div>
+<p>
+ Macros using the parenthesized syntax (see the Reference
+ section):
+ </p>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</em></span> <span class="special">)</span>
+<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+</pre>
+<p>
+ Additional "keywords":
+ </p>
+<pre class="programlisting"><span class="identifier">bind</span> used to bind variables in scope
+<span class="keyword">default</span> used to specify default parameters
+</pre>
+<p>
+ Terminals:
+ </p>
+<pre class="programlisting"><span class="bold"><strong>result-type</strong></span> a function return type (can be <span class="keyword">void</span>)
+<span class="bold"><strong>function-name</strong></span> a function name (cannot be an operator)
+
+<span class="bold"><strong>parameter-type</strong></span> a parameter type
+<span class="bold"><strong>parameter-name</strong></span> a parameter name
+<span class="bold"><strong>parameter-default</strong></span> a valid default value for the specified parameter
+
+<span class="bold"><strong>variable-name</strong></span> the name of a variable in scope (can be <span class="keyword">this</span>)
+</pre>
+<p>
+ Lexical conventions:
+ </p>
+<pre class="programlisting"><span class="emphasis"><em>a | b</em></span> symbol <span class="emphasis"><em>a</em></span> or symbol <span class="emphasis"><em>b</em></span>
+<span class="emphasis"><em>[a]</em></span> the symbol <span class="emphasis"><em>a</em></span> is optional and it can be omitted
+<span class="emphasis"><em>a+</em></span> symbol <span class="emphasis"><em>a</em></span> repeated one or more times
+</pre>
+<p>
+ Parenthesized syntax:
+ </p>
+<pre class="programlisting"><span class="emphasis"><em>parenthesized-signature:</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">inline</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="special">(</span><span class="bold"><strong>result-type</strong></span><span class="special">)</span> <span class="special">(</span><span class="bold"><strong>function-name</strong></span><span class="special">)(</span> <span class="emphasis"><em>parameter-list</em></span> <span class="special">)</span>
+
+<span class="emphasis"><em>parenthesized-binding:</em></span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="comment">// No bindings.
+</span> <span class="emphasis"><em>| bindings</em></span> <span class="comment">// Bindings (constant and/or not).
+</span>
+<span class="emphasis"><em>parameter-list:</em></span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="comment">// No parameters and no bindings.
+</span> <span class="emphasis"><em>| parameters</em></span> <span class="comment">// Only parameters.
+</span> <span class="emphasis"><em>| bindings</em></span> <span class="comment">// Only bindings.
+</span> <span class="emphasis"><em>| parameters bindings</em></span> <span class="comment">// Both parameters and bindings (must appear in this order).
+</span></pre>
+<p>
+ Function parameters:
+ </p>
+<pre class="programlisting"><span class="emphasis"><em>parameters:</em></span>
+ <span class="emphasis"><em>parameter+</em></span> <span class="comment">// Only required parameters.
+</span> <span class="emphasis"><em>| optional-parameter+</em></span> <span class="comment">// Only optional parameters.
+</span> <span class="emphasis"><em>| parameter+ optional-parameter+</em></span> <span class="comment">// Both required and optional parameters (must appear in this order).
+</span>
+<span class="emphasis"><em>parameter:</em></span>
+ <span class="emphasis"><em>[</em></span><span class="special">(</span><span class="keyword">auto</span><span class="special">)</span> <span class="emphasis"><em>|</em></span> <span class="special">(</span><span class="keyword">register</span><span class="special">)</span><span class="emphasis"><em>]</em></span> <span class="comment">// Optional parameter classifier `auto` or `register`.
+</span> <span class="special">(</span><span class="bold"><strong>parameter-type</strong></span><span class="special">)(</span><span class="bold"><strong>parameter-name</strong></span><span class="special">)</span>
+
+<span class="emphasis"><em>optional-parameter:</em></span>
+ <span class="emphasis"><em>parameter</em></span>
+ <span class="special">(</span><span class="keyword">default</span><span class="special">)(</span><span class="bold"><strong>parameter-default</strong></span><span class="special">)</span> <span class="comment">// Default value for this optional parameter.
+</span></pre>
+<p>
+ Binding variables in scope: <sup>[<a name="id892428" href="#ftn.id892428" class="footnote">21</a>]</sup> <sup>[<a name="id892732" href="#ftn.id892732" class="footnote">22</a>]</sup>
+ </p>
+<pre class="programlisting"><span class="emphasis"><em>bindings:</em></span>
+ <span class="emphasis"><em>const-bindings</em></span> <span class="comment">// Only constant binding.
+</span> <span class="emphasis"><em>| plain-bindings</em></span> <span class="comment">// Only plain binding.
+</span> <span class="emphasis"><em>| const-bindings plain-bindings</em></span> <span class="comment">// Both constant and plain bindings (must appear in this order).
+</span>
+<span class="emphasis"><em>const-bindings:</em></span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)(</span><span class="emphasis"><em>bound-variable+</em></span><span class="special">)</span> <span class="comment">// Force constant type for bound variable.
+</span>
+<span class="emphasis"><em>plain-bindings</em></span><span class="special">:</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">)(</span><span class="emphasis"><em>bound-variable+</em></span><span class="special">)</span> <span class="comment">// Use bound variable's plain type (constant or not).
+</span>
+<span class="emphasis"><em>bound-variable</em></span><span class="special">:</span>
+ <span class="special">(</span><span class="bold"><strong>variable-name</strong></span><span class="special">)</span> <span class="comment">// Bind by value.
+</span> <span class="special">|</span> <span class="special">(&amp;</span><span class="bold"><strong>variable-name</strong></span><span class="special">)</span> <span class="comment">// Bind by reference.
+</span></pre>
+<div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.id892428" href="#id892428" class="para">21</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> The alternative syntax <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)...)</span></code>
+ would have been preferred because <code class="computeroutput"><span class="keyword">const</span></code>
+ appears before the reference as usual in C++ and because a single <code class="computeroutput"><span class="identifier">bind</span></code> sequence is used for both plain and
+ constant binding (e.g., the single sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">a</span><span class="special">)(&amp;</span><span class="identifier">b</span><span class="special">)(</span><span class="keyword">const</span>
+ <span class="identifier">a</span><span class="special">)(</span><span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">))</span></code> would
+ bind by value, by constant value, by reference, and by constant reference
+ respectively). However, the parenthesized syntax parsers cannot process both
+ <code class="computeroutput"><span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="identifier">x</span></code> and <code class="computeroutput"><span class="special">&amp;</span><span class="identifier">x</span></code> because if they inspect the beginning
+ of the token <code class="computeroutput"><span class="special">&amp;</span><span class="identifier">x</span></code>
+ to search for the leading <code class="computeroutput"><span class="keyword">const</span></code>
+ they will find the non-alphanumeric symbol <code class="computeroutput"><span class="special">&amp;</span></code>
+ which cannot be used for token concatenation thus generating preprocessor
+ errors. The tokens <code class="computeroutput"><span class="special">&amp;</span><span class="identifier">x</span></code>
+ and <code class="computeroutput"><span class="identifier">x</span></code> can instead be processed
+ by the parsing macros because they do not need to be inspected from the front
+ (they are instead inspected from the back to check if a token matches <code class="computeroutput"><span class="keyword">this</span></code> and that is fine because the non-alphanumeric
+ symbol <code class="computeroutput"><span class="special">&amp;</span></code> never appears in
+ the back).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id892732" href="#id892732" class="para">22</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> Binding is used within the function
+ parameter list because this syntax seemed natural given that the bound variables
+ are used by the function body as if they were function parameters (only their
+ type is not explicitly specified by the function signature and the caller
+ does not explicitly pass their values). However, the parenthesized syntax
+ could be modified to accept <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)(...)</span></code> and <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)(...)</span></code>
+ outside the parameter list (e.g., at the very end or beginning of the function
+ signature) if an alternative syntax was to be identified as more intuitive.
+ </p></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../BOOST_IDENTITY_VALUE.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="Alternatives.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Releases.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Releases.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,95 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Releases</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Examples.html" title="Appendix: Examples">
+<link rel="next" href="Bibliography.html" title="Bibliography">
+</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="Examples.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="Bibliography.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Releases"></a><a class="link" href="Releases.html" title="Releases">Releases</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Version 0.1.1</span></dt>
+<dt><span class="section">Version 0.1.0</span></dt>
+<dt><span class="section">Version 0.0.1</span></dt>
+<dt><span class="section">TODO</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Releases.version_0_1_1"></a><a class="link" href="Releases.html#boost_local.Releases.version_0_1_1" title="Version 0.1.1">Version 0.1.1</a>
+</h3></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Uploaded library source into Boost SVN sandbox.
+ </li>
+<li class="listitem">
+ Fixed prev/next arrows and other minor layouts in documentation.
+ </li>
+<li class="listitem">
+ Added Release section to documentation.
+ </li>
+</ol></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Releases.version_0_1_0"></a><a class="link" href="Releases.html#boost_local.Releases.version_0_1_0" title="Version 0.1.0">Version 0.1.0</a>
+</h3></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ Shared with Boost for first round of comments.
+ </li></ol></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Releases.version_0_0_1"></a><a class="link" href="Releases.html#boost_local.Releases.version_0_0_1" title="Version 0.0.1">Version 0.0.1</a>
+</h3></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ Completed development, examples, and documentation.
+ </li></ol></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Releases.todo"></a><a class="link" href="Releases.html#boost_local.Releases.todo" title="TODO">TODO</a>
+</h3></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Finish local function parenthesized syntax validation macros.
+ </li>
+<li class="listitem">
+ Add examples to Alternatives section for Local Classes, C++0x lambads,
+ Boost.Lambda, and Boost.Phoenix (ask boosters).
+ </li>
+</ol></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Examples.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="Bibliography.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Starting.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Starting.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,257 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Starting</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="next" href="Tutorial.html" title="Tutorial">
+</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="../index.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="Tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Starting"></a><a class="link" href="Starting.html" title="Starting">Starting</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">This Documentation</span></dt>
+<dt><span class="section"><a href="Starting.html#boost_local.Starting.compilers_and_platforms">Compilers
+ and Platforms</a></span></dt>
+<dt><span class="section">Installation</span></dt>
+<dt><span class="section">File Structure</span></dt>
+<dt><span class="section">Symbols</span></dt>
+<dt><span class="section"><a href="Starting.html#boost_local.Starting.compile_time_configuration">Compile-Time
+ Configuration</a></span></dt>
+</dl></div>
+<p>
+ This section explains how to setup your system to use this library.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.this_documentation"></a><a class="link" href="Starting.html#boost_local.Starting.this_documentation" title="This Documentation">This Documentation</a>
+</h3></div></div></div>
+<p>
+ Programmers should be ready to use this library, at least at a basic level,
+ after reading the following sections of this documentation:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a> section
+ provides an overview on the library and its features.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Starting.html" title="Starting">Starting</a> section explains
+ how to read this documentation, how to install the library to work with
+ the supported compilers and platforms.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a> section provides
+ a good explanation of basic usages of the library with extensive examples.
+ </li>
+</ul></div>
+<p>
+ The following sections could be consulted at a later point to gain a more
+ in-depth knowledge of the library features:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The <a class="link" href="Advanced.html" title="Advanced">Advanced</a> section explains
+ advanced usages of the library.
+ </li>
+<li class="listitem">
+ The Reference section is the reference
+ manual of the library public API.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section formally
+ describes the parenthesized syntax used by this library to specify the
+ local function signatures.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section
+ describes alternatives to this library to implement local functions.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Examples.html" title="Appendix: Examples">Examples</a> section lists
+ the source code of a few additional examples that use this library.
+ </li>
+</ul></div>
+<p>
+ The following sections are for reference only:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The <a class="link" href="Releases.html" title="Releases">Releases</a> section contains
+ short release notes.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Bibliography.html" title="Bibliography">Bibliography</a> section
+ lists references that were consulted in the design and development of
+ this library.
+ </li>
+<li class="listitem">
+ The <a class="link" href="Acknowledgments.html" title="Acknowledgments">Acknowledgments</a>
+ section attempts to recognize all the people that contributes directly
+ or indirectly to the design and development of this library.
+ </li>
+</ul></div>
+<p>
+ Furthermore, some footnotes are marked by the word "<span class="bold"><strong>Rationale</strong></span>"
+ because they explain reasons behind decisions made during the design and
+ implementation of this library.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.compilers_and_platforms"></a><a class="link" href="Starting.html#boost_local.Starting.compilers_and_platforms" title="Compilers and Platforms">Compilers
+ and Platforms</a>
+</h3></div></div></div>
+<p>
+ The implementation of this library uses preprocessor and template metaprogramming
+ (as supported by Boost.Preprocessor
+ and Boost.MPL),
+ templates with partial specializations and function pointers (to support
+ an interface similar to the one of Boost.Function).
+ As a consequence, this library is fairly demanding on compilers' compliance
+ with the ISO C++ standard. At present, this library has been successfully
+ compiled and tested on the following compilers and platforms:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ GCC 4.2.4 on Ubuntu Linux.
+ </li>
+<li class="listitem">
+ GCC 3.4.4 on Cygwin.
+ </li>
+<li class="listitem">
+ Miscrosoft Visual Studio 8.0 on Windows XP.
+ </li>
+</ol></div>
+<p>
+ This library has not yet been tested on any other compiler or platform.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.installation"></a><a class="link" href="Starting.html#boost_local.Starting.installation" title="Installation">Installation</a>
+</h3></div></div></div>
+<p>
+ This library is composed of header files only. Therefore there is no pre-compiled
+ object file which needs to be installed. Programmers can simply instruct
+ the C++ compiler where to find the library header files (<code class="computeroutput"><span class="special">-</span><span class="identifier">I</span></code> option for GCC, <code class="computeroutput"><span class="special">/</span><span class="identifier">I</span></code> option for MSVC, etc) and they can start
+ compiling the code from the <a class="link" href="Examples.html" title="Appendix: Examples">Examples</a>
+ section, the code cut-and-pasted from the examples in this documentation,
+ and their own programs that use this library.
+ </p>
+<p>
+ This library implementation uses a number of Boost
+ libraries among which: Boost.Preprocessor,
+ Boost.ScopeExit,
+ Boost.Typeof,
+ Boost.TypeTraits,
+ and Boost.MPL.
+ These Boost libraries must be
+ properly installed on your system in order for this library to work.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.file_structure"></a><a class="link" href="Starting.html#boost_local.Starting.file_structure" title="File Structure">File Structure</a>
+</h3></div></div></div>
+<p>
+ The header files of this library are divided as follow:
+ </p>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a></code> <span class="emphasis"><em>local functions</em></span>
+<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.block_hpp" title="Header &lt;boost/local/block.hpp&gt;">boost/local/block.hpp</a></code> <span class="emphasis"><em>local blocks</em></span>
+<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.exit_hpp" title="Header &lt;boost/local/exit.hpp&gt;">boost/local/exit.hpp</a></code> <span class="emphasis"><em>local exits</em></span>
+<code class="computeroutput"><a class="link" href="../reference.html#header.boost.local.function_ref_hpp" title="Header &lt;boost/local/function_ref.hpp&gt;">boost/local/function_ref.hpp</a></code> <span class="emphasis"><em>references to local functions</em></span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.symbols"></a><a class="link" href="Starting.html#boost_local.Starting.symbols" title="Symbols">Symbols</a>
+</h3></div></div></div>
+<p>
+ The following symbols are part of the library private API, they are not documented,
+ and they should not be directly used by programmers: <sup>[<a name="id864012" href="#ftn.id864012" class="footnote">1</a>]</sup>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Any symbol defined by files within the <code class="computeroutput"><span class="string">"boost/local/aux_/"</span></code>
+ directory (these header files should not be directly included by programmers).
+ </li>
+<li class="listitem">
+ Any symbol prefixed by <code class="computeroutput"><span class="identifier">BOOST_LOCAL_AUX</span></code>.
+ </li>
+<li class="listitem">
+ Any symbol within the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">local</span><span class="special">::</span><span class="identifier">aux</span></code>
+ namespace.
+ </li>
+<li class="listitem">
+ Any symbol prefixed by <code class="computeroutput"><span class="identifier">boost_local_aux</span></code>
+ (regardless of its namespace).
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Starting.compile_time_configuration"></a><a class="link" href="Starting.html#boost_local.Starting.compile_time_configuration" title="Compile-Time Configuration">Compile-Time
+ Configuration</a>
+</h3></div></div></div>
+<p>
+ Some of the library behaviour can be changed at compile-time by defining
+ special <span class="emphasis"><em>configuration macros</em></span>. If a configuration macro
+ is left undefined, the library will use an appropriate default value for
+ it.
+ </p>
+<p>
+ All configuration macros have names prefixed by <code class="computeroutput"><span class="identifier">BOOST_LOCAL_CONFIG</span></code>
+ (see Reference section). It is strongly
+ recommended not to change this library configuration macros unless strictly
+ necessary.
+ </p>
+</div>
+<div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.id864012" href="#id864012" class="para">1</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This library concatenates symbols
+ specified by the programmers (e.g., the local function name) with other
+ symbols (e.g., special prefixes or preprocessor line numbers) to make internal
+ symbols with unique names to avoid name clashes. These symbols are separated
+ by the letter "<code class="computeroutput"><span class="identifier">X</span></code>"
+ when they are concatenated so they can be read more easily while debugging
+ the library. The underscore character "<code class="computeroutput"><span class="identifier">_</span></code>"
+ could not be used instead of the letter "<code class="computeroutput"><span class="identifier">X</span></code>"
+ because if the original symbols already contain a leading or trailing underscore
+ the concatenation would result in a symbol with double underscores "<code class="computeroutput"><span class="identifier">__</span></code>" which is reserved by the C++
+ standard.
+ </p></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.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="Tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost_local/Tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost_local/Tutorial.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,1026 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tutorial</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="Boost.Local 0.1.1">
+<link rel="up" href="../index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="Starting.html" title="Starting">
+<link rel="next" href="Advanced.html" title="Advanced">
+</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="Starting.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="Advanced.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Tutorial"></a><a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="Tutorial.html#boost_local.Tutorial.parenthesized_syntax">Parenthesized
+ Syntax</a></span></dt>
+<dt><span class="section">Local Functions</span></dt>
+<dt><span class="section">Binding</span></dt>
+<dt><span class="section">Local Blocks</span></dt>
+<dt><span class="section">Local Exits</span></dt>
+<dt><span class="section">Templates</span></dt>
+</dl></div>
+<p>
+ This section illustrates basic usages of local functions, local blocks, and
+ local exits.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.parenthesized_syntax"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.parenthesized_syntax" title="Parenthesized Syntax">Parenthesized
+ Syntax</a>
+</h3></div></div></div>
+<p>
+ The <span class="emphasis"><em>parenthesized syntax</em></span> is used to pass the syntactic
+ elements of a function signature as macro parameters in a way that resembles
+ the usual C++ syntax. All the function signature elements are wrapped within
+ round parenthesis <code class="computeroutput"><span class="special">()</span></code> to form
+ a Boost.Preprocessor
+ sequence called <span class="emphasis"><em>parenthesized signature</em></span>. This allows
+ to program preprocessor macros that can parse the parenthesized syntax expanding
+ differently based on the different elements that are specified in the signature
+ (if the function has parameters or not, if the result type token matches
+ the <code class="computeroutput"><span class="keyword">void</span></code> keyword or not, etc).
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ The <span class="bold"><strong>general rules to program the parenthesized signature</strong></span>
+ are:
+ </p>
+<p>
+ 1. Wrap all the signature syntactic elements within parenthesis <code class="computeroutput"><span class="special">()</span></code>. <sup>[<a name="id864335" href="#ftn.id864335" class="footnote">2</a>]</sup>
+ </p>
+<p>
+ 2. If a token does not start with an alphanumeric symbol (i.e., <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">z</span></code>,
+ <code class="computeroutput"><span class="identifier">A</span><span class="special">-</span><span class="identifier">Z</span></code>, or <code class="computeroutput"><span class="number">0</span><span class="special">-</span><span class="number">9</span></code>), replace
+ the token with its alphanumeric equivalent (as indicated in the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section). <sup>[<a name="id864462" href="#ftn.id864462" class="footnote">3</a>]</sup>
+ </p>
+<p>
+ 3. Empty parenthesis <code class="computeroutput"><span class="special">()</span></code> are
+ not allowed. <sup>[<a name="id864498" href="#ftn.id864498" class="footnote">4</a>]</sup>
+ </p>
+<p>
+ 4. Spaces and newlines do not matter and they can be used anywhere.
+ </p>
+</td></tr>
+</table></div>
+<p>
+ For example, let's rewrite the following C++ function signature using the
+ parenthesized syntax:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">l</span><span class="special">(</span><span class="keyword">double</span><span class="special">&amp;</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">)</span>
+</pre>
+<p>
+ <span class="bold"><strong>Step 1.</strong></span> We start by wrapping all the syntactic
+ elements within round parenthesis <code class="computeroutput"><span class="special">()</span></code>:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(,)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(=)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">)</span> <span class="bold"><strong><code class="literal">/* wrap all elements within parenthesis `()` */</code></strong></span>
+</pre>
+<p>
+ Note how parameter types are wrapped within parenthesis separately from parameter
+ names. However, all the tokens of a parameter type are wrapped together within
+ a single set of parenthesis because the parameter type is one single syntactic
+ element of the function signature. For example, <code class="computeroutput"><span class="identifier">x</span></code>'s
+ type is specified by <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span>
+ <span class="keyword">double</span><span class="special">&amp;)</span></code>
+ and not by <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span><span class="special">)(</span><span class="keyword">double</span><span class="special">)(&amp;)</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>Step 2.</strong></span> We note that the element <code class="computeroutput"><span class="special">(,)</span></code> wraps the non-alphanumeric symbol "<code class="computeroutput"><span class="special">,</span></code>" so it needs to be replaced. The parenthesized
+ syntax requires no special delimiter to separate function parameters (see
+ the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section) so <code class="computeroutput"><span class="special">(,)</span></code> can simply be removed (if you like, you
+ can use a space or a newline to separate the function parameters):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="bold"><strong><code class="literal">/* use spaces or newlines instead of commas to separate parameters */</code></strong></span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(=)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">)</span>
+</pre>
+<p>
+ <span class="bold"><strong>Step 3.</strong></span> We note also that the element <code class="computeroutput"><span class="special">(=)</span></code> wraps the non-alphanumeric symbol "<code class="computeroutput"><span class="special">=</span></code>" so it also needs to be replaced. The
+ parenthesized syntax uses the keyword <code class="computeroutput"><span class="keyword">default</span></code>
+ to specify a parameter default value (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section) so <code class="computeroutput"><span class="special">(=)</span></code> is replaced
+ by <code class="computeroutput"><span class="special">(</span><span class="keyword">default</span><span class="special">)</span></code>:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)</span><span class="bold"><strong>(default)</strong></span><span class="special">(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">)</span>
+</pre>
+<p>
+ We are done. The following is the valid parenthesized signature:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">)</span>
+</pre>
+<p>
+ for a function:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ With <code class="computeroutput"><span class="keyword">int</span></code> result type.
+ </li>
+<li class="listitem">
+ Named <code class="computeroutput"><span class="identifier">l</span></code>.
+ </li>
+<li class="listitem">
+ With one required parameter of type <code class="computeroutput"><span class="keyword">double</span><span class="special">&amp;</span></code> and named <code class="computeroutput"><span class="identifier">y</span></code>.
+ </li>
+<li class="listitem">
+ With an optional parameter of type <code class="computeroutput"><span class="keyword">const</span>
+ <span class="keyword">double</span><span class="special">&amp;</span></code>,
+ named <code class="computeroutput"><span class="identifier">x</span></code>, and with default
+ value <code class="computeroutput"><span class="number">0.0</span></code>.
+ </li>
+</ul></div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Unfortunately, there are intrinsic limitations to the amount of syntactic
+ error checking that can be done by the parsing macros implemented using
+ the preprocessor. As a consequence, an error in using the parenthesized
+ syntax might result in <span class="bold"><strong>cryptic preprocessor errors</strong></span>.
+ The best way to identify and correct these errors is usually to visually
+ inspect the signature comparing it with the parenthesized syntax grammar
+ (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section). When
+ syntactic errors can be detected by the parsing macros, they are raised
+ at compile-time using error messages of the form <code class="computeroutput"><span class="identifier">ERROR_</span></code><span class="emphasis"><em>description_text</em></span>.
+ <sup>[<a name="id865444" href="#ftn.id865444" class="footnote">5</a>]</sup>
+ </p></td></tr>
+</table></div>
+<a name="boost_local.Tutorial.parenthesized_syntax.functions_with_no_parameters"></a><h6>
+<a name="id865483"></a>
+ <a class="link" href="Tutorial.html#boost_local.Tutorial.parenthesized_syntax.functions_with_no_parameters">Functions
+ With No Parameters</a>
+ </h6>
+<p>
+ Let's rewrite the following C++ signature for a function with no parameters
+ using the parenthesized syntax:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">l</span><span class="special">()</span>
+</pre>
+<p>
+ If we wrap all the elements within parenthesis we have:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)</span><span class="bold"><strong>()</strong></span> <span class="comment">// Error: Empty parenthesis `()` cannot be used.
+</span></pre>
+<p>
+ However, this is not a valid parenthesized signature because it contains
+ the empty parenthesis <code class="computeroutput"><span class="special">()</span></code>.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This limitation applies to the ISO C++ standard preprocessor but it does
+ not apply to the C99 and other more recent preprocessors. This library
+ allows the <span class="bold"><strong>use of empty parenthesis</strong></span> <code class="computeroutput"><span class="special">()</span></code> if the preprocessor used supports empty
+ macro parameters. However, programmers should be well aware that if they
+ use empty parenthesis in the parenthesized syntax, the code is not C++
+ ISO standard compliant and it will be less portable (that is why the use
+ of empty parenthesis is excluded by the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section).
+ </p></td></tr>
+</table></div>
+<p>
+ C++ also allows to use the keyword <code class="computeroutput"><span class="keyword">void</span></code>
+ to specify empty parameter lists. Therefore, the original C++ function signature
+ can be equivalently rewritten as:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">l</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span>
+</pre>
+<p>
+ If we now wrap all the elements within parenthesis we obtain the valid parenthesized
+ signature:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">)</span> <span class="comment">// OK: Use `(void)` for empty parameter lists.
+</span></pre>
+<p>
+ In conclusion, the parenthesized syntax requires to use <code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span></code> to indicate
+ an empty parameter list (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.local_functions"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.local_functions" title="Local Functions">Local Functions</a>
+</h3></div></div></div>
+<p>
+ Local functions are defined using the following macros (see the Reference
+ section) from within a declarative context (this is a limitation with respect
+ to <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ lambda</a> functions which can instead appear within expressions):
+ </p>
+<pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
+</span> <span class="special">...</span>
+
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code><span class="special">(</span>
+ <span class="emphasis"><em>parenthesized-signature</em></span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="emphasis"><em>local-function-body</em></span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code><span class="special">(</span><span class="emphasis"><em>local-function-name</em></span><span class="special">)</span>
+
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This creates a functor object with the local function name that can be called
+ from the enclosing scope. Note that:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The usual C++ scope visibility rules apply to local functions for which
+ a local function is visible and can be called only within the enclosing
+ scope in which it is defined.
+ </li>
+<li class="listitem">
+ The local function signature is expressed using the parenthesized syntax
+ and passed to the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ macro.
+ </li>
+<li class="listitem">
+ The local function body is defined in a code block <code class="computeroutput"><span class="special">{</span>
+ <span class="special">...</span> <span class="special">}</span></code>
+ using the usual C++ syntax. The body is specified outside any of the
+ macros so eventual compiler error messages and line numbers retain their
+ usual meaning. <sup>[<a name="id865976" href="#ftn.id865976" class="footnote">6</a>]</sup>
+ </li>
+<li class="listitem">
+ The macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ is used to end the local function definition and it must repeat the local
+ function name. <sup>[<a name="id866010" href="#ftn.id866010" class="footnote">7</a>]</sup> The compiler will generate an error if the name specified
+ by this macro does not match the one from the local function signature
+ (see <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a></code>
+ to remove this constraint).
+ </li>
+</ul></div>
+<p>
+ For example, let's program a local function <code class="computeroutput"><span class="identifier">add</span></code>
+ similar to the one in the example from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+ section. We start by rewriting its signature:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">add</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">num</span><span class="special">)</span>
+</pre>
+<p>
+ using the parenthesized syntax:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">)</span>
+</pre>
+<p>
+ For simplicity, we will not bind any of the variables in scope just yet (binding
+ is explained later in this section).
+ </p>
+<p>
+ Then we pass the parenthesized signature to the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ macro, we implement a simple body that prints the number, and we pass the
+ local function name <code class="computeroutput"><span class="identifier">add</span></code> to
+ the <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ macro:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="identifier">num</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ This creates a local function <code class="computeroutput"><span class="identifier">add</span></code>
+ that can be called from within the enclosing scope as for example by the
+ <code class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span></code> instruction.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.binding"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.binding" title="Binding">Binding</a>
+</h3></div></div></div>
+<p>
+ Variables in scope (local variables, enclosing function parameters, member
+ variables, the object <code class="computeroutput"><span class="keyword">this</span></code>,
+ etc) can be bound to a local function declaration. Variables in scope can
+ be bound by reference, by constant reference, by value, or by constant value.
+ The types of bound variables are automatically deduced by this library using
+ Boost.Typeof.
+ <sup>[<a name="id866628" href="#ftn.id866628" class="footnote">8</a>]</sup>
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ User defined <span class="bold"><strong>types need to be manually registered</strong></span>
+ as usual when using Boost.Typeof
+ (see Boost.Typeof
+ documentation and the Local Exit example from the <a class="link" href="Examples.html" title="Appendix: Examples">Examples</a>
+ section).
+ </p></td></tr>
+</table></div>
+<p>
+ The parenthesized syntax introduces the additional "keyword" <code class="computeroutput"><span class="identifier">bind</span></code> which is used to list all the bound
+ variable names wrapped within parenthesis at the end of the local function
+ parameter list (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="emphasis"><em>result-type</em></span><span class="special">)</span> <span class="special">(</span>function-name<span class="special">)(</span> <span class="emphasis"><em>parameters</em></span> <span class="bold"><strong>(bind)(</strong></span><span class="special">(</span><span class="emphasis"><em>var1</em></span><span class="special">)(</span><span class="emphasis"><em>var2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>varN</em></span><span class="special">)</span><span class="bold"><strong>)</strong></span> <span class="special">)</span>
+</pre>
+<p>
+ Where <span class="emphasis"><em>var</em></span> is the name of the variable in scope to bind
+ and it is prefixed by <code class="computeroutput"><span class="special">&amp;</span></code>
+ if the variable is bound by reference, otherwise is it bound by value.
+ </p>
+<p>
+ For example, let's assume we want to bind two variables in scope <code class="computeroutput"><span class="identifier">a</span></code> and <code class="computeroutput"><span class="identifier">b</span></code>
+ to the local function <code class="computeroutput"><span class="identifier">l</span></code> shown
+ before. Let's also assume we want to bind <code class="computeroutput"><span class="identifier">a</span></code>
+ by value and <code class="computeroutput"><span class="identifier">b</span></code> by reference.
+ Then we use the following parenthesized signature for the local function:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">a</span><span class="special">)(&amp;</span><span class="identifier">b</span><span class="special">))</span> <span class="special">)</span>
+</pre>
+<p>
+ If a variable is bound by value, then a copy of the variable value is taken
+ at the point of the local function declaration. If a variable is bound by
+ reference instead, the variable will refer to the value it has at the point
+ of the local function call. Furthermore, it is the programmers' responsibility
+ to ensure that variables bound by reference survive the scope of declaration
+ of the local function otherwise the bound references will be invalid causing
+ run-time errors (in other words, the usual care in using C++ references must
+ be used for variables in scope bound by reference). It is also possible to
+ bind a local function to another local function as shown in the STL Transform
+ example from the <a class="link" href="Examples.html" title="Appendix: Examples">Examples</a> section
+ (note that local functions cannot be copied so they are always bound by reference
+ even if <code class="computeroutput"><span class="special">&amp;</span></code> is not specified).
+ </p>
+<p>
+ The type of bound variables is automatically deduced and it is the exact
+ same type used to declare such variables in the enclosing scope. Therefore:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ If a bound variable was declared constant using the <code class="computeroutput"><span class="keyword">const</span></code>
+ qualifier then it will be bound by constant value or reference.
+ </li>
+<li class="listitem">
+ If a bound variable was not declared constant then it will not be bound
+ as constant. This library allows to force constant biding even for variables
+ that are not originally declared constant using <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)(...)</span></code> as explained below.
+ </li>
+<li class="listitem">
+ You might want to bind variables of complex types by (constant) reference
+ instead than by value to avoid expensive copy operations when these variables
+ are automatically passed to the local function (as usual with C++ function
+ parameter passing).
+ </li>
+</ul></div>
+<p>
+ For example, let's continue to program a local function <code class="computeroutput"><span class="identifier">add</span></code>
+ similar to the one from the example in <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+ section. We bind the local variable <code class="computeroutput"><span class="identifier">sum</span></code>
+ by (non-constant) reference and update the body to perform the summation:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<a name="boost_local.Tutorial.binding.constant_binding"></a><h6>
+<a name="id867562"></a>
+ <a class="link" href="Tutorial.html#boost_local.Tutorial.binding.constant_binding">Constant Binding</a>
+ </h6>
+<p>
+ Constant binding allows to bind variables in scope by constant reference
+ or constant value (constant binding is not supported by <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ lambda</a> functions). <sup>[<a name="id867586" href="#ftn.id867586" class="footnote">9</a>]</sup>
+ </p>
+<p>
+ The parenthesized syntax uses the "keywords" <code class="computeroutput"><span class="keyword">const</span>
+ <span class="identifier">bind</span></code> to list constant bound variables
+ wrapped within parenthesis at the end of the function parameter list (see
+ the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="emphasis"><em>result-type</em></span><span class="special">)</span> <span class="special">(</span>function-name<span class="special">)(</span> <span class="emphasis"><em>parameters</em></span> <span class="bold"><strong>(const bind)(</strong></span><span class="special">(</span><span class="emphasis"><em>cvar1</em></span><span class="special">)(</span><span class="emphasis"><em>cvar2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>cvarM</em></span><span class="special">)</span><span class="bold"><strong>)</strong></span> <span class="special">)</span>
+</pre>
+<p>
+ Where <span class="emphasis"><em>cvar</em></span> is the name of the variable in scope to bind
+ by constant and it is prefixed by <code class="computeroutput"><span class="special">&amp;</span></code>
+ if the variable is bound by constant reference, otherwise it is bound by
+ constant value. If both constant and plain bindings are used, constant bindings
+ must be specified before plain bindings (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a>
+ section):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="emphasis"><em>result-type</em></span><span class="special">)</span> <span class="special">(</span>function-name<span class="special">)(</span> <span class="emphasis"><em>parameters</em></span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>cvar1</em></span><span class="special">)(</span><span class="emphasis"><em>cvar2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>cvarM</em></span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>var1</em></span><span class="special">)(</span><span class="emphasis"><em>var2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class
="emphasis"><em>varN</em></span><span class="special">))</span> <span class="special">)</span> <span class="comment">/* `(const bind)(...)` before `(bind)(...)` */</span>
+</pre>
+<p>
+ For example, let's assume we want to bind two variables in scope <code class="computeroutput"><span class="identifier">c</span></code> and <code class="computeroutput"><span class="identifier">d</span></code>
+ to the local function <code class="computeroutput"><span class="identifier">l</span></code> shown
+ before. Let's also assume we want to bind <code class="computeroutput"><span class="identifier">c</span></code>
+ by constant value and <code class="computeroutput"><span class="identifier">b</span></code> by
+ costant reference. Then we use the following parenthesized signature for
+ the local function:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">c</span><span class="special">)(&amp;</span><span class="identifier">d</span><span class="special">))</span> <span class="special">)</span>
+</pre>
+<p>
+ If the variables in scope <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">b</span></code> are also bound but
+ by (plain) value and reference respectively then the parenthesized signature
+ becomes:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">(</span><span class="identifier">l</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="keyword">double</span><span class="special">&amp;)(</span><span class="identifier">x</span><span class="special">)(</span><span class="keyword">default</span><span class="special">)(</span><span class="number">0.0</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">c</span><span class="special">)(&amp;</span><span class="identifier">d</span><span class="special">))</span> <span class="special">(</span><span class="id
entifier">bind</span><span class="special">)((</span><span class="identifier">a</span><span class="special">)(&amp;</span><span class="identifier">b</span><span class="special">))</span> <span class="special">)</span>
+</pre>
+<p>
+ Note how <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span>
+ <span class="identifier">bind</span><span class="special">)(...)</span></code>
+ must always be used before <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)(...)</span></code>
+ when they are both present.
+ </p>
+<p>
+ For example, let's continue to program a local function <code class="computeroutput"><span class="identifier">add</span></code>
+ similar to the one in the example from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+ section. We bind the local variable <code class="computeroutput"><span class="identifier">factor</span></code>
+ by constant value and update the body to perform the factor scaling:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<a name="boost_local.Tutorial.binding.binding_the_object__code__phrase_role__keyword__this__phrase___code_"></a><h6>
+<a name="id868889"></a>
+ <a class="link" href="Tutorial.html#boost_local.Tutorial.binding.binding_the_object__code__phrase_role__keyword__this__phrase___code_">Binding
+ the Object <code class="computeroutput"><span class="keyword">this</span></code></a>
+ </h6>
+<p>
+ It is also possible to bind the object <code class="computeroutput"><span class="keyword">this</span></code>
+ when it is in scope (from enclosing member functions, etc). This is done
+ by using <code class="computeroutput"><span class="keyword">this</span></code> as the name of
+ the variable to bind and by using the special symbol <code class="computeroutput"><span class="identifier">this_</span></code>
+ (instead of <code class="computeroutput"><span class="keyword">this</span></code>) to access
+ the object within the local function body. Note that:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The object <code class="computeroutput"><span class="keyword">this</span></code> can be bound
+ by value using <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="keyword">this</span><span class="special">)...)</span></code>. In this case the local function
+ will be able to modify the object when the enclosing scope is a non-constant
+ member, or it will not be able to modify the object when the enclosing
+ scope is a constant member.
+ </li>
+<li class="listitem">
+ The object <code class="computeroutput"><span class="keyword">this</span></code> can be bound
+ by constant value <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span>
+ <span class="identifier">bind</span><span class="special">)((</span><span class="keyword">this</span><span class="special">)...)</span></code>.
+ In this case the local function will never be able to modify the object
+ (regardless of whether the enclosing scope is a constant member or not).
+ </li>
+<li class="listitem">
+ Finally, the object <code class="computeroutput"><span class="keyword">this</span></code>
+ can never be bound by reference because C++ does not allow to get a reference
+ to <code class="computeroutput"><span class="keyword">this</span></code>. You will get a
+ compile-time error if you try to use <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="keyword">this</span><span class="special">)...)</span></code>
+ or <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span>
+ <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="keyword">this</span><span class="special">)...)</span></code>.
+ However, <code class="computeroutput"><span class="keyword">this</span></code> is a pointer
+ so the object is not copied even if it is bound by value. (Note that
+ it is not possible to bind <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> because it starts with <code class="computeroutput"><span class="special">*</span></code> and it is not a variable name.)
+ </li>
+</ul></div>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ When the object <code class="computeroutput"><span class="keyword">this</span></code> is bound
+ to a local function, the local function <span class="bold"><strong>body must
+ use the special symbol</strong></span> <code class="computeroutput"><span class="identifier">this_</span></code>
+ (instead of <code class="computeroutput"><span class="keyword">this</span></code>) to access
+ the bound object. <sup>[<a name="id869243" href="#ftn.id869243" class="footnote">10</a>]</sup> Using <code class="computeroutput"><span class="keyword">this</span></code> within
+ the local function body will generate a compile-time error so programmers
+ cannot mistakenly confuse the use of <code class="computeroutput"><span class="identifier">this_</span></code>
+ with <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id869342" href="#ftn.id869342" class="footnote">11</a>]</sup>
+ </p></td></tr>
+</table></div>
+<p>
+ For example, let's rewrite a local function <code class="computeroutput"><span class="identifier">add</span></code>
+ similar to the one in the example from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+ section but using a member function to illustrate how to bind the object
+ <code class="computeroutput"><span class="keyword">this</span></code>:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">class</span> <span class="identifier">adder</span> <span class="special">{</span>
+<span class="keyword">public</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.0</span><span class="special">)</span> <span class="special">{}</span>
+
+ <span class="keyword">double</span> <span class="identifier">sum</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;&amp;</span> <span class="identifier">nums</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">)</span> <span class="special">{</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="keyword">this</span><span class="special">))</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">this_</span><span class="special">-&gt;</span><span class="identifier">sum_</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span> <span class="comment">// Use `this_` instead of `this`.
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">this_</span><span class="special">-&gt;</span><span class="identifier">sum_</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+
+ <span class="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">double</span> <span class="identifier">sum_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+ <span class="identifier">v</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">100.0</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">90.5</span><span class="special">;</span> <span class="identifier">v</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
+
+ <span class="identifier">adder</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="comment">// sum = 10 * 100.0 + 10 * 90.5 + 10 * 7.0 = 1975.0
+</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span><span class="special">.</span><span class="identifier">sum</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.local_blocks"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.local_blocks" title="Local Blocks">Local Blocks</a>
+</h3></div></div></div>
+<p>
+ Local blocks are defined using the following macros within a declarative
+ context (see the Reference section):
+ </p>
+<pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
+</span> <span class="special">...</span>
+
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
+ <span class="emphasis"><em>block-body</em></span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></code>
+
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This expands to code that executes the body instructions in place where the
+ block is defined. However, only bound variables specified by the <span class="emphasis"><em>parenthesized-binding</em></span>
+ are accessible from within the local block body.
+ </p>
+<p>
+ Adopting a parenthesized syntax similar to the one used for local functions
+ (see the <a class="link" href="Grammar.html" title="Appendix: Grammar">Grammar</a> section), the
+ <span class="emphasis"><em>parenthesized-binding</em></span> can specify to bind no variable:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span>
+</pre>
+<p>
+ Or, to bind variables by constant type only:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>cvar1</em></span><span class="special">)(</span><span class="emphasis"><em>cvar2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>cvarM</em></span><span class="special">))</span>
+</pre>
+<p>
+ Or, to bind variables by plain type only:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>var1</em></span><span class="special">)(</span><span class="emphasis"><em>var2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>varN</em></span><span class="special">))</span>
+</pre>
+<p>
+ Or, to bind variables by both constant and plain types:
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>cvar1</em></span><span class="special">)(</span><span class="emphasis"><em>cvar2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>cvarM</em></span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="emphasis"><em>var1</em></span><span class="special">)(</span><span class="emphasis"><em>var2</em></span><span class="special">)</span><span class="emphasis"><em>...</em></span><span class="special">(</span><span class="emphasis"><em>varN</em></span><span class="special">))</span>
+</pre>
+<p>
+ Where <span class="emphasis"><em>cvar</em></span> and <span class="emphasis"><em>var</em></span> are the names
+ of the variables in scope to bind. They can be prefixed by <code class="computeroutput"><span class="special">&amp;</span></code> to bind by reference instead of by value,
+ and one of them can be <code class="computeroutput"><span class="keyword">this</span></code>
+ to bind the object when it is in scope.
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ A <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
+ instruction from within a local block jumps to the end of the local block
+ body and <span class="bold"><strong>it does not return the enclosing scope</strong></span>.
+ <sup>[<a name="id870864" href="#ftn.id870864" class="footnote">12</a>]</sup>
+ </p></td></tr>
+</table></div>
+<p>
+ For example, let's program a local block similar to the one in the example
+ from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a> section:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">1975.0</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <span class="comment">// OK: Complier error if `==` confused with `=`.
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Asserted summation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local block (and not the enclosing scope).
+</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
+</span> <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.local_exits"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.local_exits" title="Local Exits">Local Exits</a>
+</h3></div></div></div>
+<p>
+ Local exits are defined using the following macros within a declarative context
+ (see the Reference section):
+ </p>
+<pre class="programlisting"><span class="special">{</span> <span class="comment">// Some declarative context.
+</span> <span class="special">...</span>
+
+ <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span> <span class="special">{</span>
+ <span class="emphasis"><em>exit-body</em></span>
+ <span class="special">}</span> <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></code>
+
+ <span class="special">...</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This expands to code that executes the body instructions when the enclosing
+ scope is exited (i.e., at the very end of the enclosing scope). If multiple
+ local exits are defined within the same scope, their bodies will be executed
+ in the reverse order in which they have been defined. Only bound variables
+ specified by <span class="emphasis"><em>parenthesized-binding</em></span> are accessible from
+ within the local exit body. The <span class="emphasis"><em>parenthesized-biding</em></span>
+ is specified following the exact same syntax as for the one used by local
+ blocks.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ A <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
+ instruction from within a local exit jumps to the end of the local exit
+ body and <span class="bold"><strong>it does not return the enclosing scope</strong></span>.
+ </p></td></tr>
+</table></div>
+<p>
+ For example, let's program a local exit similar to the one in the example
+ from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a> section:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+
+ <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">size</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">nums</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Freed array: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">nums</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="keyword">return</span><span class="special">;</span> <span class="comment">// Return this local exit (and not the enclosing scope).
+</span> <span class="identifier">assert</span><span class="special">(</span><span class="keyword">false</span><span class="special">);</span> <span class="comment">// OK: Never executed.
+</span> <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ Local exits are very similar to the functionality already provided by Boost.ScopeExit
+ with the addition that they also support constant binding and the binding
+ of the object <code class="computeroutput"><span class="keyword">this</span></code>. <sup>[<a name="id872160" href="#ftn.id872160" class="footnote">13</a>]</sup>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_local.Tutorial.templates"></a><a class="link" href="Tutorial.html#boost_local.Tutorial.templates" title="Templates">Templates</a>
+</h3></div></div></div>
+<p>
+ When local functions, local blocks, and local exits are programmed within
+ templates, they need to be declared using the following special macros ending
+ with the <code class="computeroutput"><span class="identifier">TPL</span></code> postfix (see
+ the Reference section): <sup>[<a name="id872510" href="#ftn.id872510" class="footnote">14</a>]</sup>
+ </p>
+<pre class="programlisting"><code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-signature</em></span> <span class="special">)</span>
+<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+<code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a></code><span class="special">(</span> <span class="emphasis"><em>parenthesized-binding</em></span> <span class="special">)</span>
+</pre>
+<p>
+ These macros have the exact same API as their equivalents without the <code class="computeroutput"><span class="identifier">TPL</span></code> postfix that we have seen so far. The
+ local function, local block, and local exit ending macros (with the <code class="computeroutput"><span class="identifier">END</span></code> postfix) can be used unchanged within
+ templates.
+ </p>
+<p>
+ For example, let's rewrite an example similar to the one from the <a class="link" href="../index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+ section but wrapped within a template:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="identifier">T</span> <span class="identifier">total</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">z</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">();</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION_TPL</span><span class="special">(</span> <span class="comment">// Use `..._TPL()` macros in templates.
+</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="identifier">T</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="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_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
+ <span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">T</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="identifier">BOOST_LOCAL_EXIT_TPL</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">size</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">nums</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span>
+
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">y</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">z</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span>
+
+ <span class="identifier">BOOST_LOCAL_BLOCK_TPL</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">)(&amp;</span><span class="identifier">factor</span><span class="special">)(&amp;</span><span class="identifier">x</span><span class="special">)(&amp;</span><span class="identifier">y</span><span class="special">)(&amp;</span><span class="identifier">z</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">+</span> <span class="identifier">z</span><span class="special">));</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span>
+
+ <span class="keyword">return</span> <span class="identifier">sum</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">total</span><span class="special">(</span><span class="number">100.0</span><span class="special">,</span> <span class="number">90.5</span><span class="special">,</span> <span class="number">7.0</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.id864335" href="#id864335" class="para">2</a>] </sup>
+ The parenthesized syntax owes its name to the indeed large number of
+ parenthesis <code class="computeroutput"><span class="special">()</span></code> that are
+ required to wrap its elements. Programmers might notice some similarities
+ between the parenthesized syntax and the syntax of the LISP
+ programming language. However, these similarities are not intentional
+ in that they were not a design choice but rather a consequence of the
+ fact that both LISP
+ sequences and Boost.Preprocessor
+ sequences are formed by wrapping tokens within round parenthesis <code class="computeroutput"><span class="special">()</span></code>.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id864462" href="#id864462" class="para">3</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This constraint comes form
+ the fact that the C++ preprocessor can only concatenate <code class="literal">##</code>
+ alphanumeric symbols.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id864498" href="#id864498" class="para">4</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This constraint comes from
+ the fact that the ISO C++ standard preprocessor forbids empty macro parameters
+ (this is different for C99 and other more recent preprocessors).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id865444" href="#id865444" class="para">5</a>] </sup>
+ While there are fundamental limitations to the amount of parenthesized
+ syntax error checking that can be done using the preprocessor (e.g.,
+ there is no way to gracefully detect and report a missing parenthesis
+ "<code class="computeroutput"><span class="special">)</span></code>"), the current
+ implementation of the parsing macros does not perform all the error checking
+ that could be done. Improving the parenthesized syntax error checking
+ is a work in progress. Programmers are encouraged to report cryptic error
+ messages they experience because of parenthesized syntax errors so to
+ help this development effort.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id865976" href="#id865976" class="para">6</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> If the local function body
+ were instead passed as a macro parameter, it would be expanded on a
+ single line of code (because macros always expand as a single line
+ of code). Therefore, eventual compiler error line numbers would all
+ have the same value and would no longer be useful to pinpoint the error.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id866010" href="#id866010" class="para">7</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> The local function name
+ must be passed to the ending macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a></code>
+ so this macro can declare a local variable with the local function
+ name to hold the local functor object. At the same time, the local
+ function name must also be passed to the declaration macro <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a></code>
+ to allow the local function to recursively call itself. The local function
+ declaration and ending macros are kept as two separate macros so that
+ the local function body does not have to be passed as a macro parameter
+ (otherwise, the compiler error line numbers will all appear on the
+ same line and they will no longer be useful to pinpoint the errors).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id866628" href="#id866628" class="para">8</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> By binding a variable in scope,
+ the local function declaration is specifying that such a variable should
+ be accessible within the local function body regardless of its type. Semantically,
+ this binding should be seen as an "extension" of the scope of
+ the bound variable from the enclosing scope to the scope of the local function
+ body. Contrary to the semantics of a function parameter passing, in-scope
+ variable binding does not depend on the variable type but just on the variable
+ name: "The variable in scope named <span class="emphasis"><em>x</em></span> should be
+ accessible within the local function named <span class="emphasis"><em>l</em></span>".
+ This is especially useful for maintenance so if a bound variable type is
+ changed, the local function declaration does not have to change.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id867586" href="#id867586" class="para">9</a>] </sup>
+ An historical note: Constant binding of variables in scope was the main
+ use case that originally motivated the authors in developing this library.
+ The authors needed to locally create a chuck of code to assert some correctness
+ conditions while these assertions were not supposed to modify any of the
+ variables they were using (see the Contract++
+ library). This was achieved by binding by constant reference the variables
+ needed by the assertions and then by programming the local function body
+ to check the assertions (or more conveniently by using <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a></code>). This way
+ if any of the assertions mistakenly changes a bound variable (for example
+ confusing the operator <code class="computeroutput"><span class="special">==</span></code>
+ with <code class="computeroutput"><span class="special">=</span></code>), the compiler correctly
+ generates an error because the bound variable is of <code class="computeroutput"><span class="keyword">const</span></code>
+ type within the local function body.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id869243" href="#id869243" class="para">10</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This limitation comes from
+ the fact that <code class="computeroutput"><span class="keyword">this</span></code> is a
+ reserved C++ keyword so it cannot be used as the name of the internal
+ parameter passing the bound object to the local function body. It would
+ be possible to use <code class="computeroutput"><span class="keyword">this</span></code>
+ (instead of <code class="computeroutput"><span class="identifier">this_</span></code>) within
+ the local function body either at the expenses of copying the bound object
+ (which would introduce run-time overhead and also the stringent requirement
+ that the bound object must have a deep copy constructor) or by relying
+ on an <a href="http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/d3a86f27277f713b" target="_top">undefined
+ behaviour of <code class="computeroutput"><span class="keyword">static_cast</span></code></a>
+ (which might not work on all platforms at the cost of portability).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id869342" href="#id869342" class="para">11</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This is because the body
+ function is implemented as static function of the local functor class.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id870864" href="#id870864" class="para">12</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> Programmers might expect
+ <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
+ to exit the enclosing function instead of the local block (or local exit),
+ especially if the enclosing function has a <code class="computeroutput"><span class="keyword">void</span></code>
+ result type. However, using <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code> to exit local blocks (and local exits)
+ seemed to follow a more natural syntax and also it is the same syntax
+ already provided by Boost.ScopeExit
+ (in fact, <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code>
+ is used by Boost.ScopeExit
+ to exit the local scope and not to exit the enclosing scope). However,
+ if programmers were to find this use of <code class="computeroutput"><span class="keyword">return</span><span class="special">;</span></code> confusing, this library API could be
+ changed to forbid the use of <code class="computeroutput"><span class="keyword">return</span></code>
+ from within local blocks (and local exits) generating a compile-time
+ error, and to use a different instruction (e.g., <code class="computeroutput"><span class="keyword">break</span><span class="special">;</span></code> or a special macro instruction like
+ <code class="computeroutput"><span class="identifier">BOOST_LOCAL_RETURN</span><span class="special">;</span></code>)
+ to exit local blocks (and local exits).
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id872160" href="#id872160" class="para">13</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> This library could be merged
+ together with Boost.ScopeExit
+ into a new library named Boost.Scope (from the meaning of the word "scope"
+ in computer programming). This would be justified by the fact that <code class="computeroutput"><a class="link" href="../BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a></code> simply extends
+ the functionality already provided by <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span></code>.
+ The headers will be <code class="computeroutput"><span class="string">"boost/scope/function.hpp"</span></code>,
+ <code class="computeroutput"><span class="string">"boost/scope/block.hpp"</span></code>,
+ and <code class="computeroutput"><span class="string">"boost/scope/exit.hpp"</span></code>.
+ For backward compatibility with Boost.ScopeExit,
+ the header <code class="computeroutput"><span class="string">"boost/scope_exit.hpp"</span></code>
+ could also be kept and it would be equivalent to including <code class="computeroutput"><span class="string">"boost/scope/exit.hpp"</span></code>. In addition
+ and again for backward compatibility, the <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span></code>
+ macro could be extended to accept either the original Boost.ScopeExit
+ sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">var1</span><span class="special">)...(</span><span class="identifier">varN</span><span class="special">)</span></code> without the <code class="computeroutput"><span class="identifier">bind</span></code>
+ "keyword" (which would be equivalent to plain binding) or the
+ parenthesized binding sequence with the <code class="computeroutput"><span class="special">(</span><span class="identifier">bind</span><span class="special">)(...)</span></code>
+ and <code class="computeroutput"><span class="special">(</span><span class="keyword">const</span>
+ <span class="identifier">bind</span><span class="special">)(...)</span></code>
+ "keywords" plus the binding of the object <code class="computeroutput"><span class="keyword">this</span></code>.
+ Local blocks would be named "scope blocks" and they would be
+ provided by the <code class="computeroutput"><span class="identifier">BOOST_SCOPE_BLOCK</span><span class="special">...</span></code> macros. However, local functions would
+ have to be named "scope functions" and they would be provided
+ by the <code class="computeroutput"><span class="identifier">BOOST_SCOPE_FUNCTION</span><span class="special">...</span></code> macros. This might not be ideal because
+ local functions are not known under the name of "scope functions"
+ (they are indeed known by the name of "local functions" or "nested functions").
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.id872510" href="#id872510" class="para">14</a>] </sup>
+ <span class="bold"><strong>Rationale.</strong></span> Within templates, this library
+ needs to use <code class="computeroutput"><span class="keyword">typename</span></code> to explicitly
+ indicate that some expressions evaluate to a type. Because C++ does not
+ allow this use of <code class="computeroutput"><span class="keyword">typename</span></code>
+ outside templates, the special <code class="computeroutput"><span class="identifier">TPL</span></code>
+ macros are used to indicate that the enclosing scope is a template so this
+ library can safety use <code class="computeroutput"><span class="keyword">typename</span></code>
+ to resolve expression type ambiguities.
+ </p></div>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="Starting.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="Advanced.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/index.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,308 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Boost.Local 0.1.1</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="Boost.Local 0.1.1">
+<link rel="next" href="boost_local/Starting.html" title="Starting">
+</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="n" href="boost_local/Starting.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
+<div class="preface">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="boost_local"></a>Boost.Local 0.1.1 </h2></div>
+<div><div class="authorgroup"><div class="author"><h3 class="author">
+<span class="firstname">Lorenzo</span> <span class="surname">Caminiti</span>
+</h3></div></div></div>
+<div><p class="copyright">Copyright &#169; 2009 -2011 Lorenzo Caminiti</p></div>
+<div><div class="legalnotice">
+<a name="id807693"></a><p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Introduction</span></dt>
+<dt><span class="section">Starting</span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dt><span class="section">Advanced</span></dt>
+<dt><span class="section">Reference</span></dt>
+<dt><span class="section">Appendix: Grammar</span></dt>
+<dt><span class="section">Appendix: Alternatives</span></dt>
+<dt><span class="section">Appendix: Examples</span></dt>
+<dt><span class="section">Releases</span></dt>
+<dt><span class="section">Bibliography</span></dt>
+<dt><span class="section">Acknowledgments</span></dt>
+</dl>
+</div>
+<p>
+ The Boost Local library implements local functions, local blocks, and local exits
+ for the C++ programming language.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_local.Introduction"></a><a class="link" href="index.html#boost_local.Introduction" title="Introduction">Introduction</a>
+</h2></div></div></div>
+<p>
+ <span class="emphasis"><em>Local functions</em></span> are a form of <span class="emphasis"><em>information hiding</em></span>
+ and are useful for dividing procedural tasks into subtasks which are only meaningful
+ locally, avoiding cluttering other parts of the program with functions, variables,
+ etc unrelated to those parts. Local functions therefore complement other structuring
+ possibilities such as namespaces and classes. Local functions are a feature
+ of many programming languages, notably Pascal
+ and Ada,
+ yet lacking from C++ (see also [N2511]).
+ </p>
+<p>
+ This library supports the following features for local functions (see the
+ <a class="link" href="boost_local/Alternatives.html" title="Appendix: Alternatives">Alternatives</a> section for a
+ comparison between this library and features offered by C++ local class members,
+ <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Lambda_functions_and_expressions" target="_top">C++0x
+ lambda</a> functions, Boost.Lambda,
+ Boost.Phoenix,
+ and Boost.ScopeExit):
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Local functions can access, or better bind,
+ any of the variables from the enclosing scope. Furthermore, local functions
+ defined within a member function can bind the enclosing object <code class="computeroutput"><span class="keyword">this</span></code>.
+ </li>
+<li class="listitem">
+ The local function body is programmed using the usual C++ syntax.
+ </li>
+<li class="listitem">
+ Local functions can be passed as template parameters (so they can be conveniently
+ passed to STL algorithms, etc).
+ </li>
+<li class="listitem">
+ However, local functions must be defined within a declarative context (e.g.,
+ at a point in the code where local variables can be declared) thus they
+ cannot be defined within an expression.
+ </li>
+</ul></div>
+<p>
+ In addition to local functions, this library also supports the following features:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <span class="emphasis"><em>Local blocks</em></span> which define blocks of code that bind
+ variables from the enclosing scope. Local blocks allow programmers to bind
+ variables as constants (<span class="emphasis"><em>constant binding</em></span>) so to prevent
+ local chunks of code from modifying selected variables.
+ </li>
+<li class="listitem">
+ <span class="emphasis"><em>Local exits</em></span> which define blocks of code that are executed
+ when the enclosing scope is exited (again with support for constant binding
+ and binding of the object <code class="computeroutput"><span class="keyword">this</span></code>).
+ </li>
+</ul></div>
+<a name="boost_local.Introduction.an_example"></a><h6>
+<a name="id807257"></a>
+ <a class="link" href="index.html#boost_local.Introduction.an_example">An Example</a>
+ </h6>
+<p>
+ The following example illustrates a simple use of this library and it starts
+ introducing the library API (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
+ section for more details on how to use this library):
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ A local function is passed to the STL <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
+ algorithm to add together the values of an array. Variables in scope are
+ bound to the local function by both constant value and non-constant reference.
+ </li>
+<li class="listitem">
+ A local exit is used to automatically release the array's memory at scope
+ exit.
+ </li>
+<li class="listitem">
+ A local block is used to assert the correct final value of the summation
+ in a constant-correct context (therefore preventing the assertion from
+ mistakenly changing any of the variables in scope).
+ </li>
+</ul></div>
+<p>
+
+</p>
+<pre class="programlisting"><a class="co" name="boost_local0co" href="index.html#boost_local0"><img src="../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">block</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">exit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">factor</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <a class="co" name="boost_local1co" href="index.html#boost_local1"><img src="../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a>
+ <span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">(</span><span class="identifier">add</span><span class="special">)(</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)(</span><span class="identifier">num</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((</span><span class="identifier">factor</span><span class="special">))</span> <a class="co" name="boost_local2co" href="index.html#boost_local2"><img src="../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <a class="co" name="boost_local3co" href="index.html#boost_local3"><img src="../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a> <spa
n class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local4co" href="index.html#boost_local4"><img src="../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Summed: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_END</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span> <a class="co" name="boost_local5co" href="index.html#boost_local5"><img src="../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a>
+ <span class="identifier">add</span><span class="special">(</span><span class="number">100.0</span><span class="special">);</span> <a class="co" name="boost_local6co" href="index.html#boost_local6"><img src="../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a>
+
+ <span class="identifier">size_t</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="keyword">double</span><span class="special">*</span> <span class="identifier">nums</span> <span class="special">=</span> <span class="keyword">new</span> <span class="keyword">double</span><span class="special">[</span><span class="identifier">size</span><span class="special">];</span>
+ <span class="identifier">BOOST_LOCAL_EXIT</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">size</span><span class="special">))</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">)((</span><span class="identifier">nums</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local7co" href="index.html#boost_local7"><img src="../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">size</span> <span class="special">&amp;&amp;</span> <span class="identifier">nums</span><span class="special">)</span> <span class="keyword">delete</span><span class="special">[]</span> <span class="identifier">nums</span><span class="special">;</span> <a class="co" name="boost_local8co" href="index.html#boost_local8"><img src="../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Freed array: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">nums</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_EXIT_END</span> <a class="co" name="boost_local9co" href="index.html#boost_local9"><img src="../../../../doc/src/images/callouts/10.png" alt="10" border="0"></a>
+
+ <span class="identifier">nums</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">90.5</span><span class="special">;</span> <span class="identifier">nums</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">7.0</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">nums</span><span class="special">,</span> <span class="identifier">nums</span> <span class="special">+</span> <span class="identifier">size</span><span class="special">,</span> <span class="identifier">add</span><span class="special">);</span> <a class="co" name="boost_local10co" href="index.html#boost_local10"><img src="../../../../doc/src/images/callouts/11.png" alt="11" border="0"></a>
+
+ <span class="identifier">BOOST_LOCAL_BLOCK</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">)((&amp;</span><span class="identifier">sum</span><span class="special">))</span> <span class="special">)</span> <span class="special">{</span> <a class="co" name="boost_local11co" href="index.html#boost_local11"><img src="../../../../doc/src/images/callouts/12.png" alt="12" border="0"></a>
+ <span class="comment">// So far: sum = 10 * 100.0 + 10 * 90.5 + 10 * 7.0 = 1975.0
+</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">1975.0</span><span class="special">);</span> <a class="co" name="boost_local12co" href="index.html#boost_local12"><img src="../../../../doc/src/images/callouts/13.png" alt="13" border="0"></a>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"Asserted summation: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">sum</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_BLOCK_END</span> <a class="co" name="boost_local13co" href="index.html#boost_local13"><img src="../../../../doc/src/images/callouts/14.png" alt="14" border="0"></a>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local0"></a>1 </p></td>
+<td valign="top" align="left"><p>
+ Include the header files for this library local functions, local blocks,
+ and local exits.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local1"></a>2 </p></td>
+<td valign="top" align="left"><p>
+ The <span class="bold"><strong>local function</strong></span> declaration macro.
+ This macro takes one parameter specifying the local function signature
+ using the <span class="emphasis"><em>parenthesized syntax</em></span>. This syntax resembles
+ the usual C++ function declaration syntax but it wraps all tokens within
+ parenthesis (see the <a class="link" href="boost_local/Tutorial.html" title="Tutorial">Tutorial</a>
+ section). The parenthesized syntax for local functions introduces the new
+ "keyword" <code class="computeroutput"><span class="identifier">bind</span></code>
+ which is used in place of a parameter type to indicate that the following
+ sequence of parameters bind to variables in scope.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local2"></a>3 </p></td>
+<td valign="top" align="left"><p>
+ The variable <code class="computeroutput"><span class="identifier">factor</span></code> is
+ bound by constant value so it cannot be mistakenly modified by the local
+ function body.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local3"></a>4 </p></td>
+<td valign="top" align="left"><p>
+ The variable <code class="computeroutput"><span class="identifier">sum</span></code> is instead
+ bound by non-constant reference because the local function needs to change
+ its value to report the summation result to the enclosing scope.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local4"></a>5 </p></td>
+<td valign="top" align="left"><p>
+ The local function body is programmed using the usual C++ syntax.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local5"></a>6 </p></td>
+<td valign="top" align="left"><p>
+ The macro ending the local function definition (note how the local function
+ name needs to be repeated here).
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local6"></a>7 </p></td>
+<td valign="top" align="left"><p>
+ The local function macros declare a functor object local to the enclosing
+ scope named <code class="computeroutput"><span class="identifier">add</span></code>. As indicated
+ by the local function parenthesized signature, the functor <code class="computeroutput"><span class="identifier">add</span></code> has <code class="computeroutput"><span class="keyword">void</span></code>
+ result type, it can be called by specifying one parameter of type <code class="computeroutput"><span class="keyword">double</span></code>, and it has access to the variables
+ in scope <code class="computeroutput"><span class="identifier">factor</span></code> and <code class="computeroutput"><span class="identifier">sum</span></code>.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local7"></a>8 </p></td>
+<td valign="top" align="left"><p>
+ The <span class="bold"><strong>local exit</strong></span> declaration macro only
+ specifies the variables in scope to bind (eventually as constants).
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local8"></a>9 </p></td>
+<td valign="top" align="left"><p>
+ The local exit code will be automatically executed when the enclosing scope
+ is exited.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local9"></a>10 </p></td>
+<td valign="top" align="left"><p>
+ A local exit is anonymous so its ending macro takes no argument.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local10"></a>11 </p></td>
+<td valign="top" align="left"><p>
+ The local function <code class="computeroutput"><span class="identifier">add</span></code>
+ can also be passed as a template parameter to the STL <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
+ algorithm.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local11"></a>12 </p></td>
+<td valign="top" align="left"><p>
+ The <span class="bold"><strong>local block</strong></span> declaration macro only
+ specifies the variables in scope to bind (eventually as constants).
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local12"></a>13 </p></td>
+<td valign="top" align="left"><p>
+ The local block code is executed "in place" where it is programmed
+ like a usual C++ block of code <code class="computeroutput"><span class="special">{</span>
+ <span class="special">...</span> <span class="special">}</span></code>.
+ In this example, the compiler will correctly generate an error if the assignment
+ operator <code class="computeroutput"><span class="special">=</span></code> is mistakenly used
+ instead of the equality operator <code class="computeroutput"><span class="special">==</span></code>
+ because the variable <code class="computeroutput"><span class="identifier">sum</span></code>
+ is bound by constant reference so it cannot be modified.
+ </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left"><p><a name="boost_local13"></a>14 </p></td>
+<td valign="top" align="left"><p>
+ A local block is anonymous so its ending macro takes no argument.
+ </p></td>
+</tr>
+</table></div>
+</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: January 11, 2011 at 14:15:21 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="boost_local/Starting.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/reference.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/reference.html 2011-01-11 09:23:20 EST (Tue, 11 Jan 2011)
@@ -0,0 +1,110 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</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="Boost.Local 0.1.1">
+<link rel="up" href="index.html" title="Boost.Local 0.1.1">
+<link rel="prev" href="boost_local/Advanced.html" title="Advanced">
+<link rel="next" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">
+</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/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_BLOCK.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="reference"></a>Reference</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Header <boost/local/block.hpp></span></dt>
+<dt><span class="section">Header <boost/local/config.hpp></span></dt>
+<dt><span class="section">Header <boost/local/exit.hpp></span></dt>
+<dt><span class="section">Header <boost/local/function.hpp></span></dt>
+<dt><span class="section">Header <boost/local/function_ref.hpp></span></dt>
+<dt><span class="section">Header <boost/utility/identity.hpp></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.local.block_hpp"></a>Header &lt;boost/local/block.hpp&gt;</h3></div></div></div>
+<p>Local blocks allow to program code that is executed accessing some of the variables in scope as constants. </p>
+<pre class="synopsis">
+
+<a class="link" href="BOOST_LOCAL_BLOCK.html" title="Macro BOOST_LOCAL_BLOCK">BOOST_LOCAL_BLOCK</a>(parenthesized_binding)
+<a class="link" href="BOOST_LOCAL_BLOCK_TPL.html" title="Macro BOOST_LOCAL_BLOCK_TPL">BOOST_LOCAL_BLOCK_TPL</a>(parenthesized_binding)
+<a class="link" href="BOOST_LOCAL_BLOCK_END.html" title="Macro BOOST_LOCAL_BLOCK_END">BOOST_LOCAL_BLOCK_END</a></pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.local.config_hpp"></a>Header &lt;boost/local/config.hpp&gt;</h3></div></div></div>
+<p>Configuration macros allow to change the behaviour of this library at compile-time. </p>
+<pre class="synopsis">
+
+<a class="link" href="BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a>
+<a class="link" href="BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html" title="Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME">BOOST_LOCAL_CONFIG_THIS_PARAM_NAME</a></pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.local.exit_hpp"></a>Header &lt;boost/local/exit.hpp&gt;</h3></div></div></div>
+<p>Local exits allow to program code that is executed when the enclosing scope is exited. </p>
+<pre class="synopsis">
+
+<a class="link" href="BOOST_LOCAL_EXIT.html" title="Macro BOOST_LOCAL_EXIT">BOOST_LOCAL_EXIT</a>(parenthesized_binding)
+<a class="link" href="BOOST_LOCAL_EXIT_TPL.html" title="Macro BOOST_LOCAL_EXIT_TPL">BOOST_LOCAL_EXIT_TPL</a>(parenthesized_binding)
+<a class="link" href="BOOST_LOCAL_EXIT_END.html" title="Macro BOOST_LOCAL_EXIT_END">BOOST_LOCAL_EXIT_END</a></pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.local.function_hpp"></a>Header &lt;boost/local/function.hpp&gt;</h3></div></div></div>
+<p>Local functions allow to program functions locally within the scope where they are needed. </p>
+<pre class="synopsis">
+
+<a class="link" href="BOOST_LOCAL_FUNCTION.html" title="Macro BOOST_LOCAL_FUNCTION">BOOST_LOCAL_FUNCTION</a>(parenthesized_signature)
+<a class="link" href="BOOST_LOCAL_FUNCTION_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_TPL">BOOST_LOCAL_FUNCTION_TPL</a>(parenthesized_signature)
+<a class="link" href="BOOST_LOCAL_FUNCTION_END.html" title="Macro BOOST_LOCAL_FUNCTION_END">BOOST_LOCAL_FUNCTION_END</a>(local_function_name)
+<a class="link" href="BOOST_LOCAL_FUNCTION_END_RENAME.html" title="Macro BOOST_LOCAL_FUNCTION_END_RENAME">BOOST_LOCAL_FUNCTION_END_RENAME</a>(new_local_function_name)</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.local.function_ref_hpp"></a>Header &lt;boost/local/function_ref.hpp&gt;</h3></div></div></div>
+<p>Local function references can be passed as function and template parameters, they can be assigned to variables, etc. </p>
+<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">local</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> F<span class="special">,</span> <span class="identifier">size_t</span> defaults <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="boost/local/function_ref.html" title="Struct template function_ref">function_ref</a><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">}</span></pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.utility.identity_hpp"></a>Header &lt;boost/utility/identity.hpp&gt;</h3></div></div></div>
+<p>Identity macros are used to pass expressions with commas (not already wrapped within round parenthesis) as macros parameters. </p>
+<p><span class="bold"><strong>Note:</strong></span> The only way (at least as far as the authors know) to pass an arbitrary number of commas within macro parameters without explicitly indicating the number of commas is to wrap the parameter within round parenthesis that are not replaced by macro expansion and then to remove the extra parenthesis at compile-time (for type expressions) or at run-time (for value expressions). This is what these macros do. </p>
+<pre class="synopsis">
+
+<a class="link" href="BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a>(parenthesized_type)
+<a class="link" href="BOOST_IDENTITY_VALUE.html" title="Macro BOOST_IDENTITY_VALUE">BOOST_IDENTITY_VALUE</a>(parenthesized_value)</pre>
+</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 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="boost_local/Advanced.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_BLOCK.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>


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