Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76631 - in sandbox/local_function: boost/local_function/aux_ boost/local_function/aux_/macro boost/local_function/aux_/macro/code_ libs/local_function/doc libs/local_function/doc/html libs/local_function/doc/html/boost_localfunction libs/local_function/example libs/local_function/test
From: lorcaminiti_at_[hidden]
Date: 2012-01-21 18:22:19


Author: lcaminiti
Date: 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
New Revision: 76631
URL: http://svn.boost.org/trac/boost/changeset/76631

Log:
Compiling all tests and examples.
Added:
   sandbox/local_function/libs/local_function/test/addable.hpp (contents, props changed)
   sandbox/local_function/libs/local_function/test/seq.cpp (contents, props changed)
Removed:
   sandbox/local_function/libs/local_function/test/all_inputs.cpp
   sandbox/local_function/libs/local_function/test/return_factorial.cpp
Text files modified:
   sandbox/local_function/boost/local_function/aux_/function.hpp | 2
   sandbox/local_function/boost/local_function/aux_/macro/code_/functor.hpp | 17 +-
   sandbox/local_function/boost/local_function/aux_/macro/decl.hpp | 2
   sandbox/local_function/boost/local_function/aux_/macro/name.hpp | 180 ++++++++++++++++++++++++++
   sandbox/local_function/boost/local_function/aux_/member.hpp | 6
   sandbox/local_function/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html | 25 +--
   sandbox/local_function/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html | 264 ++++++++++++++++++++++++---------------
   sandbox/local_function/libs/local_function/doc/html/index.html | 5
   sandbox/local_function/libs/local_function/doc/local_function.qbk | 1
   sandbox/local_function/libs/local_function/doc/no_variadic_macros.qbk | 26 ---
   sandbox/local_function/libs/local_function/example/Jamfile.v2 | 9
   sandbox/local_function/libs/local_function/example/gcc_lambda.hpp | 9 +
   sandbox/local_function/libs/local_function/example/gcc_lambda_cpp11.cpp | 10 +
   sandbox/local_function/libs/local_function/test/Jamfile.v2 | 24 +--
   sandbox/local_function/libs/local_function/test/add_classifiers.cpp | 10 +
   sandbox/local_function/libs/local_function/test/factorial.cpp | 12
   sandbox/local_function/libs/local_function/test/nesting.cpp | 2
   sandbox/local_function/libs/local_function/test/return_assign.cpp | 11
   sandbox/local_function/libs/local_function/test/transform.cpp | 2
   sandbox/local_function/libs/local_function/test/typeof_template.cpp | 7
   20 files changed, 424 insertions(+), 200 deletions(-)

Modified: sandbox/local_function/boost/local_function/aux_/function.hpp
==============================================================================
--- sandbox/local_function/boost/local_function/aux_/function.hpp (original)
+++ sandbox/local_function/boost/local_function/aux_/function.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -134,7 +134,7 @@
     inline R operator()( \
         BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, defaults_n), \
                 BOOST_LOCAL_FUNCTION_AUX_arg_param_decl, ~) \
- ) /* cannot be const (because of binds) */ { \
+ ) /* cannot be const because of binds (same as for local ftor) */ { \
         /* run-time: do not assert preconditions here for efficiency */ \
         /* run-time: this function call is done via a function pointer */ \
         /* so unfortunately does not allow for compiler inlining */ \

Modified: sandbox/local_function/boost/local_function/aux_/macro/code_/functor.hpp
==============================================================================
--- sandbox/local_function/boost/local_function/aux_/macro/code_/functor.hpp (original)
+++ sandbox/local_function/boost/local_function/aux_/macro/code_/functor.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -171,9 +171,6 @@
     /* IMPORTANT: here can't use `PP_KEYWORD_IS_THISUNDERSCORE_FRONT()` */ \
     /* because some `param_name` might start with non-alphanumeric symbol */ \
     /* `&` (but that is never the case for `this`) */ \
- BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(4, 1, id_typename_offset_const), \
- typename \
- ) \
     BOOST_PP_IIF(BOOST_PP_COMPL(BOOST_PP_TUPLE_ELEM(4, 3, \
             id_typename_offset_const)), \
         BOOST_PP_EMPTY \
@@ -181,8 +178,14 @@
             BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_BACK( \
                     bind_var_without_type), \
         /* pointed obj const */ \
+ BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(4, 1, id_typename_offset_const), \
+ typename \
+ ) \
         BOOST_PP_IDENTITY( ::boost::local_function::aux::add_pointed_const< ) \
     , \
+ BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(4, 1, id_typename_offset_const), \
+ typename \
+ ) \
         BOOST_PP_IDENTITY( ::boost::add_const< ) /* outer type const */ \
     ))() \
     BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_BIND_TYPE_( \
@@ -383,7 +386,7 @@
         BOOST_PP_LIST_FOR_EACH_I( \
                 BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_PARAM_ARG_DECL_ENUM_, \
                 typename01, params) \
- ) const { \
+ ) /* cannot be const because of binds (same as for global fctor) */ { \
         /* just forward call to member function with local func name */ \
         return BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_CALL_BODY_(id, typename01,\
   BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_MAYBECONST_MEMBER_BIND_ENUM_, \
@@ -846,10 +849,8 @@
   BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_PARAM_DECL_ENUM_, \
                         1 /* with defaults */, params) \
             ) /* end body function params */ \
- /* const member func so it cannot change obj (reassign member */ \
- /* var with local function name, etc) */ \
- const \
- /* user local function definition `{ ... }` will follow here */ \
+ /* cannot be const because recursive functor is non const member */\
+ /* user local function definition `{ ... }` will follow here */ \
     /* `END` macro will close function class decl `};` here */
 
 // PUBLIC //

Modified: sandbox/local_function/boost/local_function/aux_/macro/decl.hpp
==============================================================================
--- sandbox/local_function/boost/local_function/aux_/macro/decl.hpp (original)
+++ sandbox/local_function/boost/local_function/aux_/macro/decl.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -41,7 +41,7 @@
     )(id) \
     ; /* close eventual previous statements, otherwise it has no effect */ \
     BOOST_MPL_ASSERT_MSG(false, /* always fails (there's an error) */ \
- BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits), ()) \
+ BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits), ())\
     ; /* must close ASSERT macro for eventual use within class scope */
 
 // PUBLIC //

Modified: sandbox/local_function/boost/local_function/aux_/macro/name.hpp
==============================================================================
--- sandbox/local_function/boost/local_function/aux_/macro/name.hpp (original)
+++ sandbox/local_function/boost/local_function/aux_/macro/name.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -7,12 +7,188 @@
 #ifndef BOOST_LOCAL_FUNCTION_AUX_NAME_HPP_
 #define BOOST_LOCAL_FUNCTION_AUX_NAME_HPP_
 
-#include <boost/local_function/aux_/macro/code_/name.hpp>
+#include <boost/local_function/aux_/macro/decl.hpp>
+#include <boost/local_function/aux_/macro/code_/functor.hpp>
+#include <boost/local_function/detail/preprocessor/keyword/recursive.hpp>
+#include <boost/local_function/detail/preprocessor/keyword/inline.hpp>
+#include <boost/local_function/aux_/function.hpp>
+#include <boost/local_function/aux_/symbol.hpp>
+#include <boost/local_function/aux_/config.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/control/expr_iif.hpp>
+#include <boost/preprocessor/logical/bitor.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+
+// PRIVATE //
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_INIT_RECURSION_FUNC_ \
+ BOOST_LOCAL_FUNCTION_AUX_SYMBOL( (init_recursion) )
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_FUNC_( \
+ is_recursive, local_function_name) \
+ BOOST_PP_IIF(is_recursive, \
+ local_function_name \
+ , \
+ BOOST_LOCAL_FUNCTION_AUX_SYMBOL( (nonrecursive_local_function_name) ) \
+ )
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_END_LOCAL_FUNCTOR_(id, \
+ local_function_name, is_recursive, \
+ local_functor_name, nonlocal_functor_name) \
+ /* `PARAMS() { ... }` expandsion here -- still within functor class */ \
+ /* class functor ## __LINE__ { ... */ \
+ public: \
+ /* member var with function name for recursive calls; must be */ \
+ /* `public` because is it also used by this macro but outside */ \
+ /* the functor class to deduce the functor type; it cannot be */ \
+ /* `const` because it is init after construction (because */ \
+ /* constructor doesn't know local function name) */ \
+ /* run-time: even when optimizing, recursive calls cannot be */ \
+ /* optimized (i.e., they must be via the non-local functor) */ \
+ /* because this cannot be a mem ref because its name is not known */ \
+ /* by the constructor so it cannot be set by the mem init list */ \
+ BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_TYPE \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_FUNC_(is_recursive, \
+ local_function_name); \
+ BOOST_PP_EXPR_IIF(is_recursive, \
+ /* run-time: the `init_recursion()` function cannot be called */ \
+ /* by the constructor to allow for compiler optimization */ \
+ /* (inlining) so it must be public */ \
+ inline void BOOST_LOCAL_FUNCTION_AUX_NAME_INIT_RECURSION_FUNC_( \
+ BOOST_LOCAL_FUNCTION_AUX_CODE_FUNCTOR_TYPE& functor) { \
+ local_function_name = functor; \
+ } \
+ ) \
+ /* local functor can be passed as tparam only on C++11 (faster) */ \
+ } local_functor_name(BOOST_LOCAL_FUNCTION_AUX_DECL_ARGS_VAR.value); \
+ /* non-local functor can always be passed as tparam (but slower) */ \
+ BOOST_TYPEOF(local_functor_name. \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_FUNC_(is_recursive, \
+ local_function_name)) \
+ nonlocal_functor_name; \
+ /* the order of the following 2 function calls cannot be changed */ \
+ /* because init_recursion uses the local_functor so the local_functor */ \
+ /* must be init first */ \
+ local_functor_name.BOOST_LOCAL_FUNCTION_AUX_FUNCTION_INIT_CALL_FUNC( \
+ &local_functor_name, nonlocal_functor_name); \
+ BOOST_PP_EXPR_IIF(is_recursive, \
+ /* init recursion causes MSVC to not optimize local function not */ \
+ /* even when local functor is used as template parameter so no */ \
+ /* recursion unless all inlining optimizations are specified off */ \
+ local_functor_name.BOOST_LOCAL_FUNCTION_AUX_NAME_INIT_RECURSION_FUNC_( \
+ nonlocal_functor_name); \
+ )
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_FUNCTOR_(local_function_name) \
+ BOOST_LOCAL_FUNCTION_AUX_SYMBOL( (local_function_name) )
+
+// This can always be passed as a template parameters (on all compilers).
+// However, it is slower because it cannot be inlined.
+// Passed at tparam: Yes (on all C++). Inlineable: No. Recursive: No.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_(local_function_name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_END_LOCAL_FUNCTOR_(__LINE__, \
+ local_function_name, \
+ /* local function is not recursive (because recursion and its */ \
+ /* initialization cannot be inlined even on C++11, */ \
+ /* so this allows optimization at least on C++11) */ \
+ 0 /* not recursive */ , \
+ /* local functor */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_FUNCTOR_(local_function_name), \
+ /* local function declared as non-local functor -- but it can */ \
+ /* be inlined only by C++11 and it cannot be recursive */ \
+ local_function_name)
+
+// This is faster on some compilers but not all (e.g., it is faster on GCC
+// because its optimization inlines it but not on MSVC). However, it cannot be
+// passed as a template parameter on non C++11 compilers.
+// Passed at tparam: Only on C++11. Inlineable: Yes. Recursive: No.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_INLINE_(local_function_name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_END_LOCAL_FUNCTOR_(__LINE__, \
+ local_function_name, \
+ /* inlined local function is never recursive (because recursion */ \
+ /* and its initialization cannot be inlined)*/ \
+ 0 /* not recursive */ , \
+ /* inlined local function declared as local functor (maybe */ \
+ /* inlined even by non C++11 -- but it can be passed as */ \
+ /* template parameter only on C++11 */ \
+ local_function_name, \
+ /* non-local functor */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_FUNCTOR_(local_function_name))
+
+// This is slower on all compilers (C++11 and non) because recursion and its
+// initialization can never be inlined.
+// Passed at tparam: Yes. Inlineable: No. Recursive: Yes.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_(local_function_name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_END_LOCAL_FUNCTOR_(__LINE__, \
+ local_function_name, \
+ /* recursive local function -- but it cannot be inlined */ \
+ 1 /* recursive */ , \
+ /* local functor */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_FUNCTOR_(local_function_name), \
+ /* local function declared as non-local functor -- but it can */ \
+ /* be inlined only by C++11 */ \
+ local_function_name)
+
+// Inlined local functions are specified by `..._NAME(inline name)`.
+// They have more chances to be inlined for faster run-times by some compilers
+// (for example by GCC but not by MSVC). C++11 compilers can always inline
+// local functions even if they are not explicitly specified inline.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_PARSE_INLINE_(qualified_name) \
+ BOOST_PP_IIF(BOOST_PP_BITOR( \
+ BOOST_LOCAL_FUNCTION_AUX_CONFIG_LOCALS_AS_TPARAMS_01, \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_INLINE_FRONT( \
+ qualified_name)), \
+ /* on C++11 always use inlining because compilers might optimize */ \
+ /* it to be faster and it can also be passed as tparam */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_INLINE_ \
+ , \
+ /* on non C++11 don't use liniling unless explicitly specified by */ \
+ /* programmers `inline name` the inlined local function cannot be */ \
+ /* passed as tparam */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_ \
+ )(BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_INLINE_REMOVE_FRONT( \
+ qualified_name))
+
+// Expand to 1 iff `recursive name` or `recursive inline name` or
+// `inline recursive name`.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_IS_RECURSIVE_(qualified_name) \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_RECURSIVE_FRONT( \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_INLINE_REMOVE_FRONT( \
+ qualified_name \
+ ))
+
+// Revmoes `recursive`, `inline recursive`, and `recursive inline` from front.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_REMOVE_RECURSIVE_AND_INLINE_( \
+ qualified_name) \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_RECURSIVE_REMOVE_FRONT( \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_INLINE_REMOVE_FRONT( \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_RECURSIVE_REMOVE_FRONT( \
+ qualified_name \
+ )))
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_REMOVE_(qualified_name) \
+ BOOST_PP_IIF(BOOST_LOCAL_FUNCTION_AUX_NAME_IS_RECURSIVE_(qualified_name), \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_REMOVE_RECURSIVE_AND_INLINE_ \
+ , \
+ qualified_name /* might be `name` or `inline name` */ \
+ BOOST_PP_TUPLE_EAT(1) \
+ )(qualified_name)
+
+// Recursive local function are specified by `..._NAME(recursive name)`.
+// They can never be inlined for faster run-time (not even by C++11 compilers).
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_PARSE_RECURSIVE_(qualified_name) \
+ BOOST_PP_IIF(BOOST_LOCAL_FUNCTION_AUX_NAME_IS_RECURSIVE_(qualified_name), \
+ /* recursion can never be inlined (not even on C++11) */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_ \
+ , \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_PARSE_INLINE_ \
+ )(BOOST_LOCAL_FUNCTION_AUX_NAME_RECURSIVE_REMOVE_(qualified_name))
 
 // PUBLIC //
 
 #define BOOST_LOCAL_FUNCTION_AUX_NAME(qualified_name) \
- BOOST_LOCAL_FUNCTION_AUX_CODE_NAME(qualified_name)
+ BOOST_LOCAL_FUNCTION_AUX_NAME_PARSE_RECURSIVE_(qualified_name)
 
 #endif // #include guard
 

Modified: sandbox/local_function/boost/local_function/aux_/member.hpp
==============================================================================
--- sandbox/local_function/boost/local_function/aux_/member.hpp (original)
+++ sandbox/local_function/boost/local_function/aux_/member.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -10,14 +10,12 @@
     typedef T& reference;
     typedef T* pointer;
 };
-
 template<typename T> struct member_type<T*> {
- typedef T& reference;
+ typedef T*& reference;
     typedef T* pointer;
 };
-
 template<typename T> struct member_type<T const*> {
- typedef T const& reference;
+ typedef T const*& reference;
     typedef T const* pointer;
 };
 

Modified: sandbox/local_function/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html
==============================================================================
--- sandbox/local_function/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html (original)
+++ sandbox/local_function/libs/local_function/doc/html/boost_localfunction/Advanced_Topics.html 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -281,14 +281,12 @@
       </p>
 <p>
 </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">call1</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">5</span> <span class="special">);</span> <span class="special">}</span>
-
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">call1</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">5</span> <span class="special">);</span> <span class="special">}</span>
 <span class="keyword">void</span> <span class="identifier">call0</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">void</span><span class="special">)&gt;</span> <span class="identifier">f</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">==</span> <span class="number">5</span> <span class="special">);</span> <span class="special">}</span>
 
-<span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)&gt;</span> <span class="identifier">linear</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">slope</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">)</span> <span class="special">&gt;</span> <span class="identifier">l2</span><span class="special">;</span>
-
- <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="identifier">bind</span> <span class="identifier">slope</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">default</span> <span class="number">1</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">default</span> <span class="number">2</span><span class="special">)</span> <span class="special">{</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span><span class="keyword">int</span> <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)&gt;</span> <span class="identifier">linear</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">slope</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">slope</span><span class="special">,</span>
+ <span class="keyword">int</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">default</span> <span class="number">1</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">default</span> <span class="number">2</span><span class="special">)</span> <span class="special">{</span>
         <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">+</span> <span class="identifier">slope</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">;</span>
     <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lin</span><span class="special">)</span>
 
@@ -351,7 +349,7 @@
 <span class="identifier">std</span><span class="special">::</span><span class="identifier">transform</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">w</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">inc</span><span class="special">);</span>
 <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">w</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">16</span> <span class="special">);</span> <span class="identifier">BOOST_CHECK</span><span class="special">(</span> <span class="identifier">w</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">==</span> <span class="number">26</span> <span class="special">);</span>
 
-<span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">inc</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
+<span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">inc</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">return</span> <span class="identifier">inc</span><span class="special">(</span><span class="identifier">i</span> <span class="special">+</span> <span class="identifier">j</span><span class="special">);</span> <span class="comment">// Call the other bound local function.</span>
 <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">inc_sum</span><span class="special">)</span>
 
@@ -375,7 +373,7 @@
 <pre class="programlisting"><span class="keyword">int</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
 
 <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_PARAMS</span><span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Nested.</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Nested.</span>
         <span class="identifier">x</span><span class="special">++;</span>
     <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">g</span><span class="special">)</span>
 
@@ -456,13 +454,10 @@
     <span class="identifier">T</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
 
     <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION_TPL</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">factor</span><span class="special">,</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">sum</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">num</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// Typeof for concept checking.</span>
+ <span class="comment">// Local function `TYPEOF` does not need `typename`.</span>
         <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">Addable</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special">&lt;</span>
                 <span class="identifier">BOOST_LOCAL_FUNCTION_TYPEOF</span><span class="special">(</span><span class="identifier">sum</span><span class="special">)&gt;::</span><span class="identifier">type</span><span class="special">&gt;));</span>
- <span class="comment">// Typeof for declarations.</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">BOOST_LOCAL_FUNCTION_TYPEOF</span><span class="special">(</span>
- <span class="identifier">factor</span><span class="special">)&gt;::</span><span class="identifier">type</span> <span class="identifier">mult</span> <span class="special">=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
- <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">mult</span><span class="special">;</span>
+ <span class="identifier">sum</span> <span class="special">+=</span> <span class="identifier">factor</span> <span class="special">*</span> <span class="identifier">num</span><span class="special">;</span>
     <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">add</span><span class="special">)</span>
 
     <span class="identifier">add</span><span class="special">(</span><span class="number">6</span><span class="special">);</span>
@@ -659,8 +654,8 @@
                 <span class="keyword">bool</span> <span class="identifier">recursion</span><span class="special">,</span> <span class="keyword">default</span> <span class="keyword">false</span><span class="special">)</span> <span class="special">{</span>
             <span class="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">num</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">num</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">num</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">this_</span><span class="special">-&gt;</span><span class="identifier">results</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">result</span><span class="special">);</span>
             <span class="keyword">return</span> <span class="identifier">result</span><span class="special">;</span>

Modified: sandbox/local_function/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html
==============================================================================
--- sandbox/local_function/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html (original)
+++ sandbox/local_function/libs/local_function/doc/html/boost_localfunction/No_Variadic_Macros.html 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -30,7 +30,8 @@
 <div class="toc"><dl>
 <dt><span class="section"><a href="No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.sequence_syntax">Sequence
       Syntax</a></span></dt>
-<dt><span class="section">Examples</span></dt>
+<dt><span class="section"><a href="No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.an_example">An
+ Example</a></span></dt>
 </dl></div>
 <p>
       This section illustrates an alternative syntax for compilers without variadic
@@ -107,112 +108,167 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_localfunction.No_Variadic_Macros.examples"></a><a class="link" href="No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.examples" title="Examples">Examples</a>
+<a name="boost_localfunction.No_Variadic_Macros.an_example"></a><a class="link" href="No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.an_example" title="An Example">An
+ Example</a>
 </h3></div></div></div>
 <p>
- The following is a list of most of the examples presented in this documentation
- reprogrammed using the sequence syntax instead of the comma-separated list:
+ The following is an example that shows a bit of all the different macro parameter
+ combinations using the sequence syntax (see also "seq.cpp"):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">s</span> <span class="special">{</span>
+ <span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">p</span> <span class="special">=</span> <span class="number">1.23</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">q</span> <span class="special">=</span> <span class="special">-</span><span class="number">1.23</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">{</span> <span class="comment">// Only params.</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="special">{</span> <span class="comment">// Only const binds.</span>
+ <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">;</span>
+
+ <span class="keyword">const</span> <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">b</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">();</span>
+
+ <span class="keyword">const</span> <span class="identifier">s</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="special">*</span><span class="identifier">this_</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
+ <span class="identifier">t</span><span class="special">();</span>
+
+ <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
+ <span class="identifier">lt</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="special">{</span> <span class="comment">// Only plain binds.</span>
+ <span class="keyword">int</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
+
+ <span class="keyword">int</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">d</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">();</span>
+
+ <span class="identifier">s</span><span class="special">&amp;</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="special">*</span><span class="identifier">this_</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
+ <span class="identifier">t</span><span class="special">();</span>
+
+ <span class="keyword">int</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">c</span><span class="special">;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
+ <span class="identifier">lt</span><span class="special">();</span>
+ <span class="special">}</span>
+
+ <span class="special">{</span> <span class="comment">// Both params and const binds.</span>
+ <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
+ <span class="identifier">t</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
+ <span class="identifier">lt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="special">{</span> <span class="comment">// Both params and plain binds.</span>
+ <span class="keyword">int</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
+ <span class="identifier">t</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lt</span><span class="special">)</span>
+ <span class="identifier">lt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="special">{</span> <span class="comment">// Both const and plain binds.</span>
+ <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ct</span><span class="special">)</span>
+ <span class="identifier">ct</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lct</span><span class="special">)</span>
+ <span class="identifier">lct</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span>
+ <span class="identifier">pt</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lpt</span><span class="special">)</span>
+ <span class="identifier">lpt</span><span class="special">();</span>
+ <span class="special">}</span>
+
+ <span class="special">{</span> <span class="comment">// All params, const binds, and plain binds.</span>
+ <span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+ <span class="identifier">l</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">ct</span><span class="special">)</span>
+ <span class="identifier">ct</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span>
+ <span class="identifier">pt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lct</span><span class="special">)</span>
+ <span class="identifier">lct</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">BOOST_LOCAL_FUNCTION</span><span class="special">(</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span> <span class="identifier">a</span><span class="special">)</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">b</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">(</span><span class="identifier">bind</span><span class="special">&amp;</span> <span class="identifier">q</span><span class="special">)</span>
+ <span class="special">(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">y</span><span class="special">)(</span><span class="keyword">default</span> <span class="number">0</span><span class="special">)</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span> <span class="identifier">BOOST_LOCAL_FUNCTION_NAME</span><span class="special">(</span><span class="identifier">lpt</span><span class="special">)</span>
+ <span class="identifier">lpt</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
       </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<thead><tr><th>
- <p>
- Files
- </p>
- </th></tr></thead>
-<tbody>
-<tr><td>
- <p>
- "add_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_classifiers_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_default_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_except_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_inline_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_lambda_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_nobind_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_template_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_this_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_typed_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "add_with_default_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "nesting_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "overload_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "return_assign_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "ten_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "transform_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "typeof_seq.cpp"
- </p>
- </td></tr>
-<tr><td>
- <p>
- "typeof_template_seq.cpp"
- </p>
- </td></tr>
-</tbody>
-</table></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/local_function/libs/local_function/doc/html/index.html
==============================================================================
--- sandbox/local_function/libs/local_function/doc/html/index.html (original)
+++ sandbox/local_function/libs/local_function/doc/html/index.html 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -100,7 +100,8 @@
 <dd><dl>
 <dt><span class="section"><a href="boost_localfunction/No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.sequence_syntax">Sequence
       Syntax</a></span></dt>
-<dt><span class="section">Examples</span></dt>
+<dt><span class="section"><a href="boost_localfunction/No_Variadic_Macros.html#boost_localfunction.No_Variadic_Macros.an_example">An
+ Example</a></span></dt>
 </dl></dd>
 <dt><span class="section">Appendix: Implementation</span></dt>
 <dd><dl>
@@ -221,7 +222,7 @@
 <span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span>
 </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 21, 2012 at 18:28:00 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 21, 2012 at 22:31:55 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/local_function/libs/local_function/doc/local_function.qbk
==============================================================================
--- sandbox/local_function/libs/local_function/doc/local_function.qbk (original)
+++ sandbox/local_function/libs/local_function/doc/local_function.qbk 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -82,6 +82,7 @@
 [import ../test/overload.cpp]
 [import ../test/add_except.cpp]
 [import ../test/add_classifiers.cpp]
+[import ../test/seq.cpp]
 
 [import ../example/const_block.cpp]
 [import ../example/gcc_lambda.cpp]

Modified: sandbox/local_function/libs/local_function/doc/no_variadic_macros.qbk
==============================================================================
--- sandbox/local_function/libs/local_function/doc/no_variadic_macros.qbk (original)
+++ sandbox/local_function/libs/local_function/doc/no_variadic_macros.qbk 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -27,31 +27,11 @@
 
 [endsect]
 
-[section Examples]
+[section An Example]
 
-The following is a list of most of the examples presented in this documentation reprogrammed using the sequence syntax instead of the comma-separated list:
+The following is an example that shows a bit of all the different macro parameter combinations using the sequence syntax (see also [@../../test/seq.cpp `"seq.cpp"`]):
 
-[table
- [ [Files] ]
- [ [[@../../test/add_seq.cpp `"add_seq.cpp"`]] ]
- [ [[@../../test/add_classifiers_seq.cpp `"add_classifiers_seq.cpp"`]] ]
- [ [[@../../test/add_default_seq.cpp `"add_default_seq.cpp"`]] ]
- [ [[@../../test/add_except_seq.cpp `"add_except_seq.cpp"`]] ]
- [ [[@../../test/add_inline_seq.cpp `"add_inline_seq.cpp"`]] ]
- [ [[@../../test/add_lambda_seq.cpp `"add_lambda_seq.cpp"`]] ]
- [ [[@../../test/add_nobind_seq.cpp `"add_nobind_seq.cpp"`]] ]
- [ [[@../../test/add_template_seq.cpp `"add_template_seq.cpp"`]] ]
- [ [[@../../test/add_this_seq.cpp `"add_this_seq.cpp"`]] ]
- [ [[@../../test/add_typed_seq.cpp `"add_typed_seq.cpp"`]] ]
- [ [[@../../test/add_with_default_seq.cpp `"add_with_default_seq.cpp"`]] ]
- [ [[@../../test/nesting_seq.cpp `"nesting_seq.cpp"`]] ]
- [ [[@../../test/overload_seq.cpp `"overload_seq.cpp"`]] ]
- [ [[@../../test/return_assign_seq.cpp `"return_assign_seq.cpp"`]] ]
- [ [[@../../test/ten_seq.cpp `"ten_seq.cpp"`]] ]
- [ [[@../../test/transform_seq.cpp `"transform_seq.cpp"`]] ]
- [ [[@../../test/typeof_seq.cpp `"typeof_seq.cpp"`]] ]
- [ [[@../../test/typeof_template_seq.cpp `"typeof_template_seq.cpp"`]] ]
-]
+[test_seq]
 
 [endsect]
 

Modified: sandbox/local_function/libs/local_function/example/Jamfile.v2
==============================================================================
--- sandbox/local_function/libs/local_function/example/Jamfile.v2 (original)
+++ sandbox/local_function/libs/local_function/example/Jamfile.v2 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -5,16 +5,19 @@
     <library>/boost//unit_test_framework
 ;
 
+# @todo profiling
+# @todo impl_factorial
+
 compile-fail const_block.cpp ;
 run const_block_ok.cpp ;
 run scope_exit.cpp ;
 
-#run gcc_lambda.cpp ;
-#run gcc_lambda_cpp11.cpp ;
+run gcc_lambda.cpp ;
+run gcc_lambda_cpp11.cpp ;
 
 run gcc_access.cpp ;
 run gcc_square.cpp ;
-#run gcc_store.cpp ;
+run gcc_store.cpp ;
 
 #run impl_factorial.cpp ;
 run impl_pp_keyword.cpp ;

Modified: sandbox/local_function/libs/local_function/example/gcc_lambda.hpp
==============================================================================
--- sandbox/local_function/libs/local_function/example/gcc_lambda.hpp (original)
+++ sandbox/local_function/libs/local_function/example/gcc_lambda.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -84,6 +84,11 @@
         )(results)
 #endif
 
+#define GCC_LAMBDA_TUPLE_(binds_params_results) \
+ GCC_LAMBDA_(BOOST_PP_TUPLE_ELEM(3, 0, binds_params_results), \
+ BOOST_PP_TUPLE_ELEM(3, 1, binds_params_results), \
+ BOOST_PP_TUPLE_ELEM(3, 2, binds_params_results))
+
 #define GCC_LAMBDA_END_(id) \
     BOOST_LOCAL_FUNCTION_NAME(BOOST_PP_CAT(gcc_lambda_, id)) \
     BOOST_PP_CAT(gcc_lambda_, id); \
@@ -95,11 +100,11 @@
 // const bind v is =v, bind& v is &v, void if no return specified, no = or &.
 #ifdef BOOST_NO_VARIADIC_MACROS
 # define GCC_LAMBDA(void_or_seq) \
- BOOST_PP_EXPAND(GCC_LAMBDA_ GCC_LAMBDA_SPLIT_( \
+ GCC_LAMBDA_TUPLE_(GCC_LAMBDA_SPLIT_( \
                 BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(void_or_seq)))
 #else
 # define GCC_LAMBDA(...) \
- BOOST_PP_EXPAND(GCC_LAMBDA_ GCC_LAMBDA_SPLIT_( \
+ GCC_LAMBDA_TUPLE_(GCC_LAMBDA_SPLIT_( \
                 BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(__VA_ARGS__)))
 #endif
 

Modified: sandbox/local_function/libs/local_function/example/gcc_lambda_cpp11.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/example/gcc_lambda_cpp11.cpp (original)
+++ sandbox/local_function/libs/local_function/example/gcc_lambda_cpp11.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -1,4 +1,8 @@
 
+#include <boost/config.hpp>
+
+#ifndef BOOST_NO_LAMBDAS
+
 #define BOOST_TEST_MODULE ExampleGccLambdaCpp11
 #include <boost/test/unit_test.hpp>
 #include <algorithm>
@@ -20,3 +24,9 @@
     BOOST_CHECK( *iter == val );
 }
 
+#else
+
+int main(void) { return 0; } // Trivial test.
+
+#endif
+

Modified: sandbox/local_function/libs/local_function/test/Jamfile.v2
==============================================================================
--- sandbox/local_function/libs/local_function/test/Jamfile.v2 (original)
+++ sandbox/local_function/libs/local_function/test/Jamfile.v2 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -5,14 +5,6 @@
     <library>/boost//unit_test_framework
 ;
 
-# @todo make all these compile
-# @toto add all return tests to Examples
-# @todo add _seq for all tests and examples
-
-#msvc
-##gcc
-###gcc c++0x
-
 run add.cpp ;
 run add_classifiers.cpp ;
 run add_default.cpp ;
@@ -20,24 +12,24 @@
 run add_inline.cpp ;
 run add_lambda.cpp ;
 run add_nobind.cpp ;
-##run add_template.cpp ;
+run add_template.cpp ;
 run add_this.cpp ;
 run add_typed.cpp ;
 run add_with_default.cpp ;
 
-#run factorial.cpp ;
-#run nesting.cpp ;
+run factorial.cpp ;
+run nesting.cpp ;
 run overload.cpp ;
 run ten.cpp ;
-##run transform.cpp ;
+run transform.cpp ;
 run typeof.cpp ;
-##run typeof_template.cpp ;
-#run all_inputs.cpp ;
+run typeof_template.cpp ;
 
-#run return_assign.cpp ;
+run return_assign.cpp ;
 run return_derivative.cpp ;
-##run return_factorial.cpp ;
 run return_inc.cpp ;
 run return_setget.cpp ;
 run return_this.cpp ;
 
+run seq.cpp ;
+

Modified: sandbox/local_function/libs/local_function/test/add_classifiers.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/add_classifiers.cpp (original)
+++ sandbox/local_function/libs/local_function/test/add_classifiers.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -4,6 +4,10 @@
 // License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_AUTO_DECLARATIONS // No C++11 auto declarations.
+
 #include <boost/local_function.hpp>
 #define BOOST_TEST_MODULE TestAddClassifiers
 #include <boost/test/unit_test.hpp>
@@ -18,3 +22,9 @@
     BOOST_CHECK( add(1, 2) == 3 );
 }
 
+#else // C++11 auto declarations.
+
+int main(void) { return 0; } // Trivial test.
+
+#endif
+

Added: sandbox/local_function/libs/local_function/test/addable.hpp
==============================================================================
--- (empty file)
+++ sandbox/local_function/libs/local_function/test/addable.hpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -0,0 +1,19 @@
+
+#ifndef ADDABLE_HPP_
+#define ADDABLE_HPP_
+
+#include <boost/concept_check.hpp>
+
+template<typename T>
+struct Addable { // User-defined concept.
+ BOOST_CONCEPT_USAGE(Addable) {
+ return_type(x + y); // Check addition `T operator+(T x, T y)`.
+ }
+private:
+ T x;
+ T y;
+ void return_type(T const&); // Used to check addition returns type `T`.
+};
+
+#endif // #include guard
+

Deleted: sandbox/local_function/libs/local_function/test/all_inputs.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/all_inputs.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
+++ (empty file)
@@ -1,164 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-//[params_all_cpp
-#include <boost/local/function.hpp>
-
-struct s {
- void f(double p = 1.23, double q = -1.23) {
- { // Only params.
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0) ) {
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l(1);
- }
- { // Only const binds.
- int a, b;
-
- const int& BOOST_LOCAL_FUNCTION_PARAMS( (const bind a)
- (const bind& b) (const bind& p) (const bind q) ) {
- return b;
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l();
-
- const s& BOOST_LOCAL_FUNCTION_PARAMS( (const bind this) ) {
- return *this_;
- } BOOST_LOCAL_FUNCTION_NAME(t)
- t();
-
- const int BOOST_LOCAL_FUNCTION_PARAMS( (const bind a)
- (const bind& b) (const bind& p) (const bind q)
- (const bind this) ) {
- return a;
- } BOOST_LOCAL_FUNCTION_NAME(lt)
- lt();
- }
- { // Only plain binds.
- int c, d;
-
- int& BOOST_LOCAL_FUNCTION_PARAMS( (bind c) (bind& d)
- (bind& p) (bind& q) ) {
- return d;
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l();
-
- s& BOOST_LOCAL_FUNCTION_PARAMS( (bind this) ) {
- return *this_;
- } BOOST_LOCAL_FUNCTION_NAME(t)
- t();
-
- int BOOST_LOCAL_FUNCTION_PARAMS( (bind c) (bind& d)
- (bind& p) (bind& q) (bind this) ) {
- return c;
- } BOOST_LOCAL_FUNCTION_NAME(lt)
- lt();
- }
-
- { // Both params and const binds.
- int a, b;
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind& b)
- (const bind& p) (const bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind this) ) {
- } BOOST_LOCAL_FUNCTION_NAME(t)
- t(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind this)
- (const bind& b) (const bind& p) (const bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lt)
- lt(1);
- }
- { // Both params and plain binds.
- int c, d;
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (bind c) (bind& d) (bind& p) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (bind this) ) {
- } BOOST_LOCAL_FUNCTION_NAME(t)
- t(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (bind c) (bind& d)
- (bind& p) (bind this) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lt)
- lt(1);
- }
- { // Both const and plain binds.
- int a, b, c, d;
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (const bind a) (const bind& b)
- (const bind p) (bind c) (bind& d) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l();
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (const bind this)
- (bind c) (bind& d) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(ct)
- ct();
- void BOOST_LOCAL_FUNCTION_PARAMS( (const bind this)
- (const bind a) (const bind& b) (const bind p)
- (bind c) (bind& d) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lct)
- lct();
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (const bind a) (const bind& b)
- (const bind p) (bind this) ) {
- } BOOST_LOCAL_FUNCTION_NAME(pt)
- pt();
- void BOOST_LOCAL_FUNCTION_PARAMS( (const bind a) (const bind& b)
- (const bind p) (bind c) (bind this) (bind& d) (bind q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lpt)
- lpt();
- }
-
- { // All params, const binds, and plain binds.
- int a, b, c, d;
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind& b) (const bind& p)
- (bind c) (bind& d) (bind& q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(l)
- l(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind this) (bind c) (bind& d) (bind& q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(ct)
- ct(1);
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind& b) (const bind& p)
- (bind this) ) {
- } BOOST_LOCAL_FUNCTION_NAME(pt)
- pt(1);
-
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind this) (const bind& b)
- (const bind& p) (bind c) (bind& d) (bind& q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lct)
- lct(1);
- void BOOST_LOCAL_FUNCTION_PARAMS( (int x) (int y)(default 0)
- (const bind a) (const bind& b) (const bind& p)
- (bind c) (bind& d) (bind this) (bind& q) ) {
- } BOOST_LOCAL_FUNCTION_NAME(lpt)
- lpt(1);
- }
- }
-};
-
-int main() {
- s().f();
- return 0;
-}
-//]
-

Modified: sandbox/local_function/libs/local_function/test/factorial.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/factorial.cpp (original)
+++ sandbox/local_function/libs/local_function/test/factorial.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -19,8 +19,8 @@
                 bool recursion, default false) {
             int result = 0;
             
- if (n < 2 ) result = 1;
- else result = n * factorial(n - 1, true); // Recursive call.
+ if (num < 2 ) result = 1;
+ else result = num * factorial(num - 1, true); // Recursive call.
 
             if (!recursion) this_->results.push_back(result);
             return result;
@@ -33,12 +33,12 @@
 
 BOOST_AUTO_TEST_CASE( test_factorial ) {
     std::vector<int> v(3);
- v[0] = 1; v[1] = 4; v[2] = 7;
+ v[0] = 1; v[1] = 3; v[2] = 4;
 
     calculator calc;
     calc.factorials(v);
- BOOST_CHECK( calc.results[0] == 1 );
- BOOST_CHECK( calc.results[1] == 24 );
- BOOST_CHECK( calc.results[2] == 64 );
+ BOOST_CHECK( calc.results[0] == 1 );
+ BOOST_CHECK( calc.results[1] == 6 );
+ BOOST_CHECK( calc.results[2] == 24 );
 }
 

Modified: sandbox/local_function/libs/local_function/test/nesting.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/nesting.cpp (original)
+++ sandbox/local_function/libs/local_function/test/nesting.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -13,7 +13,7 @@
     int x = 0;
 
     void BOOST_LOCAL_FUNCTION(bind& x) {
- void BOOST_LOCAL_FUNCTION_PARAMS(bind& x) { // Nested.
+ void BOOST_LOCAL_FUNCTION(bind& x) { // Nested.
             x++;
         } BOOST_LOCAL_FUNCTION_NAME(g)
 

Modified: sandbox/local_function/libs/local_function/test/return_assign.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/return_assign.cpp (original)
+++ sandbox/local_function/libs/local_function/test/return_assign.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -8,16 +8,15 @@
 #include <boost/function.hpp>
 #define BOOST_TEST_MODULE TestReturnAssign
 #include <boost/test/unit_test.hpp>
+#include <iostream>
 
 //[test_return_assign
-void call1(boost::function<int (int)> f) { BOOST_CHECK( f(1) == 5 ); }
-
+void call1(boost::function<int (int) > f) { BOOST_CHECK( f(1) == 5 ); }
 void call0(boost::function<int (void)> f) { BOOST_CHECK( f() == 5 ); }
 
-boost::function<int (int, int)> linear(int slope) {
- boost::function< int (int, int) > l2;
-
- int BOOST_LOCAL_FUNCTION(bind slope, int x, default 1, int y, default 2) {
+boost::function<int (int, int)> linear(const int& slope) {
+ int BOOST_LOCAL_FUNCTION(const bind& slope,
+ int x, default 1, int y, default 2) {
         return x + slope * y;
     } BOOST_LOCAL_FUNCTION_NAME(lin)
 

Deleted: sandbox/local_function/libs/local_function/test/return_factorial.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/return_factorial.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
+++ (empty file)
@@ -1,30 +0,0 @@
-
-#include <boost/local_function.hpp>
-#include <boost/function.hpp>
-#define BOOST_TEST_MODULE TestReturnFactorial
-#include <boost/test/unit_test.hpp>
-#include <vector>
-#include <iostream>
-
-boost::function<int (int)> factorial(std::vector<int>& steps) {
- int BOOST_LOCAL_FUNCTION(bind& steps, int n) {
- int result;
- if(n < 2) result = 1;
- else result = n * (*this)(n - 1); // Recursive call.
- steps.push_back(result);
- return result;
- } BOOST_LOCAL_FUNCTION_NAME(fact)
- return fact;
-}
-
-BOOST_AUTO_TEST_CASE( test_return_factorial ) {
- std::vector<int> steps;
- boost::function<int (int)> fact = factorial(steps);
-
- int i = fact(4); BOOST_CHECK( i == 24 );
- i = steps.at(0); BOOST_CHECK( i == 1 );
- i = steps.at(1); BOOST_CHECK( i == 2 );
- i = steps.at(2); BOOST_CHECK( i == 6 );
- i = steps.at(3); BOOST_CHECK( i == 24 );
-}
-

Added: sandbox/local_function/libs/local_function/test/seq.cpp
==============================================================================
--- (empty file)
+++ sandbox/local_function/libs/local_function/test/seq.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -0,0 +1,165 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
+// copy at http://www.boost.org/LICENSE_1_0.txt).
+
+#include <boost/local_function.hpp>
+
+//[test_seq
+struct s {
+ void f(double p = 1.23, double q = -1.23) {
+ { // Only params.
+ void BOOST_LOCAL_FUNCTION( (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l(1);
+ }
+ { // Only const binds.
+ int a, b;
+
+ const int& BOOST_LOCAL_FUNCTION( (const bind a)
+ (const bind& b) (const bind& p) (const bind q) ) {
+ return b;
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l();
+
+ const s& BOOST_LOCAL_FUNCTION( (const bind this_) ) {
+ return *this_;
+ } BOOST_LOCAL_FUNCTION_NAME(t)
+ t();
+
+ const int BOOST_LOCAL_FUNCTION( (const bind a)
+ (const bind& b) (const bind& p) (const bind q)
+ (const bind this_) ) {
+ return a;
+ } BOOST_LOCAL_FUNCTION_NAME(lt)
+ lt();
+ }
+ { // Only plain binds.
+ int c, d;
+
+ int& BOOST_LOCAL_FUNCTION( (bind c) (bind& d)
+ (bind& p) (bind& q) ) {
+ return d;
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l();
+
+ s& BOOST_LOCAL_FUNCTION( (bind this_) ) {
+ return *this_;
+ } BOOST_LOCAL_FUNCTION_NAME(t)
+ t();
+
+ int BOOST_LOCAL_FUNCTION( (bind c) (bind& d)
+ (bind& p) (bind& q) (bind this_) ) {
+ return c;
+ } BOOST_LOCAL_FUNCTION_NAME(lt)
+ lt();
+ }
+
+ { // Both params and const binds.
+ int a, b;
+
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
+ (const bind& p) (const bind q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l(1);
+
+ void BOOST_LOCAL_FUNCTION( (const bind this_)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(t)
+ t(1);
+
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind this_)
+ (const bind& b) (const bind& p) (const bind q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lt)
+ lt(1);
+ }
+ { // Both params and plain binds.
+ int c, d;
+
+ void BOOST_LOCAL_FUNCTION( (bind c) (bind& d) (bind& p) (bind q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l(1);
+
+ void BOOST_LOCAL_FUNCTION( (bind this_)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(t)
+ t(1);
+
+ void BOOST_LOCAL_FUNCTION( (bind c) (bind& d)
+ (bind& p) (bind this_) (bind q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lt)
+ lt(1);
+ }
+ { // Both const and plain binds.
+ int a, b, c, d;
+
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
+ (const bind p) (bind c) (bind& d) (bind q) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l();
+
+ void BOOST_LOCAL_FUNCTION( (const bind this_)
+ (bind c) (bind& d) (bind q) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(ct)
+ ct();
+ void BOOST_LOCAL_FUNCTION( (const bind this_)
+ (const bind a) (const bind& b) (const bind p)
+ (bind c) (bind& d) (bind q) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lct)
+ lct();
+
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
+ (const bind p) (bind this_) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(pt)
+ pt();
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
+ (const bind p) (bind c) (bind this_) (bind& d) (bind q) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lpt)
+ lpt();
+ }
+
+ { // All params, const binds, and plain binds.
+ int a, b, c, d;
+
+ void BOOST_LOCAL_FUNCTION(
+ (const bind a) (const bind& b) (const bind& p)
+ (bind c) (bind& d) (bind& q) (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(l)
+ l(1);
+
+ void BOOST_LOCAL_FUNCTION( (const bind this_)
+ (bind c) (bind& d) (bind& q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(ct)
+ ct(1);
+ void BOOST_LOCAL_FUNCTION(
+ (const bind a) (const bind& b) (const bind& p)
+ (bind this_) (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(pt)
+ pt(1);
+
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind this_)
+ (const bind& b) (const bind& p) (bind c) (bind& d)
+ (bind& q) (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lct)
+ lct(1);
+ void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
+ (const bind& p) (bind c) (bind& d) (bind this_) (bind& q)
+ (int x) (int y)(default 0) ) {
+ } BOOST_LOCAL_FUNCTION_NAME(lpt)
+ lpt(1);
+ }
+ }
+};
+//]
+
+int main(void) {
+ s().f();
+ return 0;
+}
+

Modified: sandbox/local_function/libs/local_function/test/transform.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/transform.cpp (original)
+++ sandbox/local_function/libs/local_function/test/transform.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -27,7 +27,7 @@
     std::transform(v.begin(), v.end(), w.begin(), inc);
     BOOST_CHECK( w[0] == 16 ); BOOST_CHECK( w[1] == 26 );
 
- int BOOST_LOCAL_FUNCTION(const bind& inc, int i, int j) {
+ int BOOST_LOCAL_FUNCTION(bind& inc, int i, int j) {
         return inc(i + j); // Call the other bound local function.
     } BOOST_LOCAL_FUNCTION_NAME(inc_sum)
     

Modified: sandbox/local_function/libs/local_function/test/typeof_template.cpp
==============================================================================
--- sandbox/local_function/libs/local_function/test/typeof_template.cpp (original)
+++ sandbox/local_function/libs/local_function/test/typeof_template.cpp 2012-01-21 18:22:15 EST (Sat, 21 Jan 2012)
@@ -18,13 +18,10 @@
     T sum = 0;
 
     void BOOST_LOCAL_FUNCTION_TPL(const bind factor, bind& sum, T num) {
- // Typeof for concept checking.
+ // Local function `TYPEOF` does not need `typename`.
         BOOST_CONCEPT_ASSERT((Addable<typename boost::remove_reference<
                 BOOST_LOCAL_FUNCTION_TYPEOF(sum)>::type>));
- // Typeof for declarations.
- boost::remove_reference<BOOST_LOCAL_FUNCTION_TYPEOF(
- factor)>::type mult = factor * num;
- sum += mult;
+ sum += factor * num;
     } BOOST_LOCAL_FUNCTION_NAME(add)
 
     add(6);


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