Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76071 - in sandbox/closure/boost: . closure closure/aux_ closure/aux_/macro closure/aux_/macro/code_ closure/aux_/preprocessor/traits
From: lorcaminiti_at_[hidden]
Date: 2011-12-19 16:58:57


Author: lcaminiti
Date: 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
New Revision: 76071
URL: http://svn.boost.org/trac/boost/changeset/76071

Log:
Fixed bug on binding order of const and non-const binds.
Added:
   sandbox/closure/boost/config_ext.hpp
      - copied, changed from r76043, /sandbox/closure/boost/boost_config.hpp
Removed:
   sandbox/closure/boost/boost_config.hpp
   sandbox/closure/boost/closure/aux_/config.hpp
Text files modified:
   sandbox/closure/boost/closure/aux_/function.hpp | 159 ++++++++++++++++++++------------------
   sandbox/closure/boost/closure/aux_/macro/closure.hpp | 8
   sandbox/closure/boost/closure/aux_/macro/code_/bind.hpp | 26 +++--
   sandbox/closure/boost/closure/aux_/macro/code_/end.hpp | 10 +-
   sandbox/closure/boost/closure/aux_/macro/code_/functor.hpp | 162 +++++++++++++++++----------------------
   sandbox/closure/boost/closure/aux_/macro/code_/result.hpp | 5
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp | 12 --
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp | 13 ---
   sandbox/closure/boost/closure/config.hpp | 107 ++-----------------------
   sandbox/closure/boost/config_ext.hpp | 4
   10 files changed, 197 insertions(+), 309 deletions(-)

Deleted: sandbox/closure/boost/boost_config.hpp
==============================================================================
--- sandbox/closure/boost/boost_config.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
+++ (empty file)
@@ -1,25 +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).
-
-#ifndef BOOST_CONFIG_HPP_
-#define BOOST_CONFIG_HPP_
-
-#include <boost/config.hpp>
-
-// If it is possible to pass local types (classes, etc) as template parameters.
-// This is not possible in pure C++03 but it is possible in some C++03
-// extensions (MSVC, GCC 4.5.x, etc).
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)) && \
- defined(__GXX_EXPERIMENTAL_CXX0X__)
- // From GCC 4.5.x when -std=c++0x specified.
-# define BOOST_LOCAL_TYPES_AS_TEMPLATE_PARAMS
-#elif defined(_MSC_VER)
- // For (all?) MSVC (tested on MVSC 8.0).
-# define BOOST_LOCAL_TYPES_AS_TEMPLATE_PARAMS
-#endif
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/aux_/config.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/config.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
+++ (empty file)
@@ -1,17 +0,0 @@
-
-#ifndef BOOST_CLOSURE_AUX_CONFIG_HPP_
-#define BOOST_CLOSURE_AUX_CONFIG_HPP_
-
-#include <boost/boost_config.hpp>
-#include <boost/closure/config.hpp>
-
-// PUBLIC //
-
-#if !defined(BOOST_LOCAL_TYPES_AS_TEMPLATE_PARAMS)
-# define BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 1
-#else
-# define BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 0
-#endif
-
-#endif // #include guard
-

Modified: sandbox/closure/boost/closure/aux_/function.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/function.hpp (original)
+++ sandbox/closure/boost/closure/aux_/function.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -5,11 +5,10 @@
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
 #if !BOOST_PP_IS_ITERATING
-# ifndef BOOST_LOCAL_AUX_FUNCTION_HPP_
-# define BOOST_LOCAL_AUX_FUNCTION_HPP_
+# ifndef BOOST_CLOSURE_AUX_FUNCTION_HPP_
+# define BOOST_CLOSURE_AUX_FUNCTION_HPP_
 
-# include "file.hpp"
-# include "../config.hpp"
+# include <boost/closure/config.hpp>
 # include <boost/call_traits.hpp>
 # include <boost/preprocessor/iteration/iterate.hpp>
 # include <boost/preprocessor/repetition/repeat.hpp>
@@ -19,54 +18,65 @@
 # include <boost/preprocessor/arithmetic/inc.hpp>
 # include <boost/preprocessor/cat.hpp>
 
-#define BOOST_LOCAL_AUX_arg_type(z, arg_n, unused) \
+// PRIVATE //
+
+#define BOOST_CLOSURE_AUX_FUNCTION_THIS_FILE_ \
+ "boost/closure/aux_/function.hpp"
+
+// PUBLIC //
+
+#define BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC \
+ BOOST_CLOSURE_AUX_SYMBOL( (init_call) )
+
+#define BOOST_CLOSURE_AUX_arg_type(z, arg_n, unused) \
     BOOST_PP_CAT(A, arg_n)
 
-#define BOOST_LOCAL_AUX_arg_param_type(z, arg_n, unused) \
- typename ::boost::call_traits<BOOST_LOCAL_AUX_arg_type(z, arg_n, unused) \
- >::param_type
+#define BOOST_CLOSURE_AUX_arg_param_type(z, arg_n, unused) \
+ typename ::boost::call_traits< \
+ BOOST_CLOSURE_AUX_arg_type(z, arg_n, unused) \
+ >::param_type
 
-#define BOOST_LOCAL_AUX_arg_name(z, arg_n, unused) \
+#define BOOST_CLOSURE_AUX_arg_name(z, arg_n, unused) \
     BOOST_PP_CAT(a, arg_n)
 
-#define BOOST_LOCAL_AUX_arg(z, arg_n, unused) \
- BOOST_LOCAL_AUX_arg_param_type(z, arg_n, unused) \
- BOOST_LOCAL_AUX_arg_name(z, arg_n, unused)
+#define BOOST_CLOSURE_AUX_arg(z, arg_n, unused) \
+ BOOST_CLOSURE_AUX_arg_param_type(z, arg_n, unused) \
+ BOOST_CLOSURE_AUX_arg_name(z, arg_n, unused)
 
-#define BOOST_LOCAL_AUX_arg_tparam(z, arg_n, unused) \
- typename BOOST_LOCAL_AUX_arg_type(z, arg_n, unused)
+#define BOOST_CLOSURE_AUX_arg_tparam(z, arg_n, unused) \
+ typename BOOST_CLOSURE_AUX_arg_type(z, arg_n, unused)
 
-#define BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
+#define BOOST_CLOSURE_AUX_call_ptr(z, n, unused) \
     BOOST_PP_CAT(call_ptr, n)
 
-#define BOOST_LOCAL_AUX_call_name(z, n, unused) \
+#define BOOST_CLOSURE_AUX_call_name(z, n, unused) \
     BOOST_PP_CAT(call, n)
 
-#define BOOST_LOCAL_AUX_call_member(z, n, unused) \
- BOOST_PP_CAT(BOOST_LOCAL_AUX_call_name(z, n, unused), _)
+#define BOOST_CLOSURE_AUX_call_member(z, n, unused) \
+ BOOST_PP_CAT(BOOST_CLOSURE_AUX_call_name(z, n, unused), _)
 
-#define BOOST_LOCAL_AUX_call_typedef(z, n, arity) \
- typedef R (*BOOST_LOCAL_AUX_call_ptr(z, n, ~))(object_ptr \
+#define BOOST_CLOSURE_AUX_call_typedef(z, n, arity) \
+ typedef R (*BOOST_CLOSURE_AUX_call_ptr(z, n, ~))(object_ptr \
             BOOST_PP_COMMA_IF(BOOST_PP_SUB(arity, n)) \
             BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, n), \
- BOOST_LOCAL_AUX_arg_param_type, ~));
+ BOOST_CLOSURE_AUX_arg_param_type, ~));
 
-#define BOOST_LOCAL_AUX_call_param(z, n, unused) \
- BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
- BOOST_LOCAL_AUX_call_name(z, n, unused)
-
-#define BOOST_LOCAL_AUX_call_decl(z, n, unused) \
- BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
- BOOST_LOCAL_AUX_call_member(z, n, unused);
-
-#define BOOST_LOCAL_AUX_call_init(z, n, unused) \
- BOOST_LOCAL_AUX_call_member(z, n, unused) = \
- BOOST_LOCAL_AUX_call_name(z, n, unuzed);
+#define BOOST_CLOSURE_AUX_call_param(z, n, unused) \
+ BOOST_CLOSURE_AUX_call_ptr(z, n, unused) \
+ BOOST_CLOSURE_AUX_call_name(z, n, unused)
+
+#define BOOST_CLOSURE_AUX_call_decl(z, n, unused) \
+ BOOST_CLOSURE_AUX_call_ptr(z, n, unused) \
+ BOOST_CLOSURE_AUX_call_member(z, n, unused);
+
+#define BOOST_CLOSURE_AUX_call_init(z, n, unused) \
+ BOOST_CLOSURE_AUX_call_member(z, n, unused) = \
+ BOOST_CLOSURE_AUX_call_name(z, n, unuzed);
                 
-#define BOOST_LOCAL_AUX_operator_call(z, defaults_n, arity) \
+#define BOOST_CLOSURE_AUX_operator_call(z, defaults_n, arity) \
     /* precondition: object_ && call_function_ */ \
     inline R operator()(BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, defaults_n), \
- BOOST_LOCAL_AUX_arg, ~)) const { \
+ BOOST_CLOSURE_AUX_arg, ~)) const { \
         /* 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 */ \
@@ -74,10 +84,10 @@
         /* investigated but also virtual functions cannot be optimized */ \
         /* plus they require virtual table lookups to the alternative */ \
         /* performed worst) */ \
- return BOOST_LOCAL_AUX_call_member(z, defaults_n, ~)(object_ \
+ return BOOST_CLOSURE_AUX_call_member(z, defaults_n, ~)(object_ \
                 BOOST_PP_COMMA_IF(BOOST_PP_SUB(arity, defaults_n)) \
                 BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, defaults_n), \
- BOOST_LOCAL_AUX_arg_name, ~)); \
+ BOOST_CLOSURE_AUX_arg_name, ~)); \
     }
 
 namespace boost { namespace local { namespace aux {
@@ -89,47 +99,48 @@
 
 // Iterate within namespace.
 # define BOOST_PP_ITERATION_PARAMS_1 \
- (3, (0, BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX, \
- BOOST_LOCAL_AUX_FILE_FUNCTION_HPP))
+ (3, (0, BOOST_CLOSURE_CONFIG_FUNCTION_ARITY_MAX, \
+ BOOST_CLOSURE_AUX_FUNCTION_THIS_FILE_))
 # include BOOST_PP_ITERATE() // Iterate over function arity.
 
 }}} // namespace boost::loca::aux
 
-#undef BOOST_LOCAL_AUX_arg_type
-#undef BOOST_LOCAL_AUX_arg_param_type
-#undef BOOST_LOCAL_AUX_arg_name
-#undef BOOST_LOCAL_AUX_arg
-#undef BOOST_LOCAL_AUX_arg_tparam
-#undef BOOST_LOCAL_AUX_call_ptr
-#undef BOOST_LOCAL_AUX_call_name
-#undef BOOST_LOCAL_AUX_call_member
-#undef BOOST_LOCAL_AUX_call_typedef
-#undef BOOST_LOCAL_AUX_call_param
-#undef BOOST_LOCAL_AUX_call_decl
-#undef BOOST_LOCAL_AUX_call_init
-#undef BOOST_LOCAL_AUX_operator_call
+#undef BOOST_CLOSURE_AUX_arg_type
+#undef BOOST_CLOSURE_AUX_arg_param_type
+#undef BOOST_CLOSURE_AUX_arg_name
+#undef BOOST_CLOSURE_AUX_arg
+#undef BOOST_CLOSURE_AUX_arg_tparam
+#undef BOOST_CLOSURE_AUX_call_ptr
+#undef BOOST_CLOSURE_AUX_call_name
+#undef BOOST_CLOSURE_AUX_call_member
+#undef BOOST_CLOSURE_AUX_call_typedef
+#undef BOOST_CLOSURE_AUX_call_param
+#undef BOOST_CLOSURE_AUX_call_decl
+#undef BOOST_CLOSURE_AUX_call_init
+#undef BOOST_CLOSURE_AUX_operator_call
 
 # endif // #include guard
 
 #elif BOOST_PP_ITERATION_DEPTH() == 1
-# define BOOST_LOCAL_AUX_arity BOOST_PP_FRAME_ITERATION(1)
+# define BOOST_CLOSURE_AUX_arity BOOST_PP_FRAME_ITERATION(1)
 # define BOOST_PP_ITERATION_PARAMS_2 \
- (3, (0, BOOST_LOCAL_AUX_arity, \
- BOOST_LOCAL_AUX_FILE_FUNCTION_HPP))
+ (3, (0, BOOST_CLOSURE_AUX_arity, \
+ BOOST_CLOSURE_AUX_FUNCTION_THIS_FILE_))
 # include BOOST_PP_ITERATE() // Iterate over default params count.
-# undef BOOST_LOCAL_AUX_arity
+# undef BOOST_CLOSURE_AUX_arity
 
 #elif BOOST_PP_ITERATION_DEPTH() == 2
-# define BOOST_LOCAL_AUX_defaults BOOST_PP_FRAME_ITERATION(2)
+# define BOOST_CLOSURE_AUX_defaults BOOST_PP_FRAME_ITERATION(2)
 
-// Iterating within namespce boost::local::aux.
-template<typename R
- BOOST_PP_COMMA_IF(BOOST_LOCAL_AUX_arity)
- BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity, BOOST_LOCAL_AUX_arg_tparam, ~)
+// Iterating within namespce `boost::closure::aux`.
+template<
+ typename R
+ BOOST_PP_COMMA_IF(BOOST_CLOSURE_AUX_arity)
+ BOOST_PP_ENUM(BOOST_CLOSURE_AUX_arity, BOOST_CLOSURE_AUX_arg_tparam, ~)
>
 class function<
- R (BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity, BOOST_LOCAL_AUX_arg_type, ~))
- , BOOST_LOCAL_AUX_defaults
+ R (BOOST_PP_ENUM(BOOST_CLOSURE_AUX_arity, BOOST_CLOSURE_AUX_arg_type, ~))
+ , BOOST_CLOSURE_AUX_defaults
> {
     // The object type will actually be a local class which cannot be passed as
     // a template parameter so a generic `void*` pointer is used to hold the
@@ -143,8 +154,8 @@
     // require virtual tables lookups so the virtual functions trick measured
     // worst run-time performance than the function pointer trick).
     typedef void* object_ptr;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_call_typedef, BOOST_LOCAL_AUX_arity)
+ BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_CLOSURE_AUX_defaults), // INC so no dflt.
+ BOOST_CLOSURE_AUX_call_typedef, BOOST_CLOSURE_AUX_arity)
 public:
     // run-time: use compiler-generated default constructor, copy constructor,
     // and copy operator (this class only has pointers as member variables and
@@ -153,33 +164,33 @@
 
     // Cannot be private but it should never be used by programmers directly
     // so used internal symbol.
- inline void BOOST_LOCAL_AUX_SYMBOL_INIT_CALL_FUNCTION_NAME(
+ inline void BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC(
         object_ptr object,
- BOOST_PP_ENUM(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC no dflt.
- BOOST_LOCAL_AUX_call_param, ~)
+ BOOST_PP_ENUM(BOOST_PP_INC(BOOST_CLOSURE_AUX_defaults), // INC no dflt.
+ BOOST_CLOSURE_AUX_call_param, ~)
     ) {
         object_ = object;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults),
- BOOST_LOCAL_AUX_call_init, ~)
+ BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_CLOSURE_AUX_defaults),
+ BOOST_CLOSURE_AUX_call_init, ~)
         unused_ = 0; // To avoid a GCC uninitialized variable error.
     }
     
     // Result operator(Arg1, ..., ArgN-1, ArgN) -- iff defaults >= 0
     // Result operator(Arg1, ..., ArgN-1) -- iff defaults >= 1
     // ... -- etc
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_operator_call, BOOST_LOCAL_AUX_arity)
+ BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_CLOSURE_AUX_defaults), // INC no dflt.
+ BOOST_CLOSURE_AUX_operator_call, BOOST_CLOSURE_AUX_arity)
 
 private:
     object_ptr object_;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_call_decl, ~)
+ BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_CLOSURE_AUX_defaults), // INC no dflt.
+ BOOST_CLOSURE_AUX_call_decl, ~)
 
     // run-time: this unused void* member variable allows for compiler
     // optimizations (at least on MSVC it reduces invocation time of about 50%)
     void* unused_;
 };
 
-# undef BOOST_LOCAL_AUX_defaults
+# undef BOOST_CLOSURE_AUX_defaults
 #endif // iteration
 

Modified: sandbox/closure/boost/closure/aux_/macro/closure.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/macro/closure.hpp (original)
+++ sandbox/closure/boost/closure/aux_/macro/closure.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -20,10 +20,6 @@
 #include <boost/preprocessor/list/adt.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
 
-// Undefine local function bound args global variable. Actual declaration of
-// this variable is made using SFINAE mechanisms by each local function macro.
-extern boost::scope_exit::aux::undeclared BOOST_CLOSURE_AUX_CLOSURE_ARGS_VAR;
-
 // PRIVATE //
 
 #define BOOST_CLOSURE_AUX_CLOSURE_OK_(decl_traits, id, typename01) \
@@ -60,6 +56,10 @@
 #define BOOST_CLOSURE_AUX_CLOSURE_ARGS_VAR \
     BOOST_CLOSURE_AUX_SYMBOL( (args) )
 
+// Undefine local function bound args global variable. Actual declaration of
+// this variable is made using SFINAE mechanisms by each local function macro.
+extern boost::scope_exit::aux::undeclared BOOST_CLOSURE_AUX_CLOSURE_ARGS_VAR;
+
 #define BOOST_CLOSURE_AUX_CLOSURE(decl_seq, id, typename01) \
     BOOST_CLOSURE_AUX_CLOSURE_(BOOST_CLOSURE_AUX_PP_DECL_TRAITS(decl_seq), \
             id, typename01)

Modified: sandbox/closure/boost/closure/aux_/macro/code_/bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/macro/code_/bind.hpp (original)
+++ sandbox/closure/boost/closure/aux_/macro/code_/bind.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -7,13 +7,12 @@
 #ifndef BOOST_CLOSURE_AUX_CODE_BIND_HPP_
 #define BOOST_CLOSURE_AUX_CODE_BIND_HPP_
 
-/** @todo uncomment these includes */
 #include <boost/closure/aux_/symbol.hpp>
 #include <boost/closure/aux_/preprocessor/traits/bind.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_binds.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp>
 #include <boost/utility/identity.hpp>
-//#include <boost/scope_exit.hpp>
+#include <boost/scope_exit.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/function_traits.hpp>
 #include <boost/preprocessor/control/expr_iif.hpp>
@@ -21,6 +20,7 @@
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
 #include <boost/preprocessor/facilities/identity.hpp>
+#include <boost/preprocessor/logical/bitand.hpp>
 #include <boost/preprocessor/punctuation/comma_if.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
@@ -169,22 +169,26 @@
         /* initialize the struct with param values to bind */ \
         BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(all_bind_this_types), \
                 this) /* here name `this` access object at enclosing scope */ \
- BOOST_PP_COMMA_IF(BOOST_PP_LIST_IS_CONS(BOOST_PP_LIST_APPEND( \
- all_bind_this_types, all_binds))) \
- BOOST_PP_LIST_FOR_EACH_I(BOOST_CLOSURE_AUX_CODE_BIND_PARAM_INIT_, \
- id, all_binds) \
+ BOOST_PP_COMMA_IF(BOOST_PP_BITAND( \
+ BOOST_PP_LIST_IS_CONS(all_bind_this_types) \
+ , BOOST_PP_LIST_IS_CONS(all_binds) \
+ )) \
+ BOOST_PP_LIST_FOR_EACH_I(BOOST_CLOSURE_AUX_CODE_BIND_PARAM_INIT_, id, \
+ all_binds) \
     };
 
 #define BOOST_CLOSURE_AUX_CODE_BIND_(decl_traits, id, typename01) \
- /* has some bind param then all bind names is never empty nil-seq */ \
+ /* IMPORTANT: the order of these appends is important, it must follow */ \
+ /* the indexing order used by the functor code which starts */ \
+ /* enumerating const binds and then non-const binds */ \
     BOOST_CLOSURE_AUX_CODE_BIND_ALL_( \
             BOOST_PP_LIST_APPEND( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits), \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits)),\
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits),\
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits)), \
             BOOST_PP_LIST_APPEND( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
- decl_traits), \
                     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
+ decl_traits), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
                             decl_traits)), \
             id, typename01)
 

Modified: sandbox/closure/boost/closure/aux_/macro/code_/end.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/macro/code_/end.hpp (original)
+++ sandbox/closure/boost/closure/aux_/macro/code_/end.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -7,14 +7,14 @@
 #ifndef BOOST_CLOSURE_AUX_CODE_END_HPP_
 #define BOOST_CLOSURE_AUX_CODE_END_HPP_
 
-/** @todo uncomment these includes */
-#include <boost/closure/aux_/config.hpp>
+#include <boost/closure/config.hpp>
 #include <boost/closure/aux_/symbol.hpp>
+#include <boost/closure/aux_/function.hpp>
 #include <boost/closure/aux_/macro/closure.hpp>
 #include <boost/closure/aux_/macro/code_/functor.hpp>
 #include <boost/closure/detail/preprocessor/keyword/recursive.hpp>
 #include <boost/closure/detail/preprocessor/keyword/inline.hpp>
-//#include <boost/typeof/typeof.hpp>
+#include <boost/typeof/typeof.hpp>
 #include <boost/preprocessor/logical/bitor.hpp>
 #include <boost/preprocessor/control/expr_iif.hpp>
 #include <boost/preprocessor/control/iif.hpp>
@@ -72,7 +72,7 @@
     /* 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_CLOSURE_AUX_CODE_FUNCTOR_INIT_CALL_FUNC( \
+ local_functor_name.BOOST_CLOSURE_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 */ \
@@ -137,7 +137,7 @@
 // local functions even if they are not explicitly specified inline.
 #define BOOST_CLOSURE_AUX_CODE_END_MAYBE_INLINE_(qualified_name) \
     BOOST_PP_IIF(BOOST_PP_BITOR( \
- BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01, \
+ BOOST_CLOSURE_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01, \
             BOOST_CLOSURE_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 */ \

Modified: sandbox/closure/boost/closure/aux_/macro/code_/functor.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/macro/code_/functor.hpp (original)
+++ sandbox/closure/boost/closure/aux_/macro/code_/functor.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -7,9 +7,8 @@
 #ifndef BOOST_CLOSURE_AUX_CODE_FUNCTOR_HPP_
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_HPP_
 
-/** @todo uncomment these includes */
 #include <boost/closure/aux_/symbol.hpp>
-//#include <boost/closure/aux_/function.hpp>
+#include <boost/closure/aux_/function.hpp>
 #include <boost/closure/aux_/add_pointed_const.hpp>
 #include <boost/closure/aux_/macro/closure.hpp>
 #include <boost/closure/aux_/macro/closure_typeof.hpp>
@@ -22,7 +21,7 @@
 #include <boost/closure/detail/preprocessor/keyword/register.hpp>
 #include <boost/closure/detail/preprocessor/keyword/this.hpp>
 #include <boost/utility/identity.hpp>
-//#include <boost/scope_exit.hpp>
+#include <boost/scope_exit.hpp>
 #include <boost/type_traits/add_const.hpp>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/punctuation/comma_if.hpp>
@@ -30,6 +29,8 @@
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/facilities/expand.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/facilities/identity.hpp>
 #include <boost/preprocessor/repetition/enum.hpp>
 #include <boost/preprocessor/repetition/repeat.hpp>
 #include <boost/preprocessor/arithmetic/inc.hpp>
@@ -40,6 +41,7 @@
 #include <boost/preprocessor/logical/compl.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/tuple/rem.hpp>
 #include <boost/preprocessor/list/adt.hpp>
 #include <boost/preprocessor/list/size.hpp>
 #include <boost/preprocessor/list/for_each_i.hpp>
@@ -124,14 +126,11 @@
     BOOST_CLOSURE_AUX_SYMBOL( (bind_this) )
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_TYPE_( \
- id_typename_offset, i, bind_traits) \
- BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(3, 1, id_typename_offset), typename) \
- BOOST_SCOPE_EXIT_AUX_PARAMS_T( \
- BOOST_PP_TUPLE_ELEM(3, 0, id_typename_offset)):: \
- BOOST_SCOPE_EXIT_AUX_PARAM_T( \
- BOOST_PP_TUPLE_ELEM(3, 0, id_typename_offset), \
- BOOST_PP_ADD(i, BOOST_PP_TUPLE_ELEM(3, 2, id_typename_offset)),\
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE(bind_traits))
+ id, typename01, offset, i, bind_var_without_type) \
+ BOOST_PP_EXPR_IIF(typename01, typename) \
+ BOOST_SCOPE_EXIT_AUX_PARAMS_T(id):: \
+ BOOST_SCOPE_EXIT_AUX_PARAM_T(id, BOOST_PP_ADD(i, offset), \
+ bind_var_without_type) \
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_MEMBER_BIND_( \
         r, offset, i, bind_traits) \
@@ -141,69 +140,57 @@
 
 // Adapted from `BOOST_SCOPE_EXIT_AUX_ARG_DECL()`.
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_( \
- r, id_typename_offset, i, bind_traits, is_const) \
+ r, id_typename_offset_const, i, bind_var_without_type) \
     /* IMPORTANT: here can't use `PP_KEYWORD_IS_THIS_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(3, 1, id_typename_offset), typename) \
- BOOST_PP_EXPR_IF(is_const, \
- BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THIS_BACK( \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE( \
- bind_traits)), \
- ::boost::local::aux::add_pointed_const< /* pointed obj const */ \
- , \
- ::boost::add_const< /* outer type const */ \
- ) \
+ BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(4, 1, id_typename_offset_const), \
+ typename \
     ) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_TYPE_(id_typename_offset, \
- i, bind_traits) \
- BOOST_PP_EXPR_IF(is_const, >::type) \
- BOOST_PP_IIF(BOOST_DETAIL_PP_KEYWORD_IS_THIS_BACK( \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE( \
- bind_traits)), \
+ BOOST_PP_IIF(BOOST_PP_COMPL(BOOST_PP_TUPLE_ELEM(4, 3, \
+ id_typename_offset_const)), \
+ BOOST_PP_EMPTY \
+ , BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THIS_BACK( \
+ bind_var_without_type), \
+ /* pointed obj const */ \
+ BOOST_PP_IDENTITY( ::boost::local::aux::add_pointed_const< ) \
+ , \
+ BOOST_PP_IDENTITY( ::boost::add_const< ) /* outer type const */ \
+ ))() \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_TYPE_( \
+ BOOST_PP_TUPLE_ELEM(4, 0, id_typename_offset_const), \
+ BOOST_PP_TUPLE_ELEM(4, 1, id_typename_offset_const), \
+ BOOST_PP_TUPLE_ELEM(4, 2, id_typename_offset_const), \
+ i, bind_var_without_type) \
+ BOOST_PP_EXPR_IIF(BOOST_PP_TUPLE_ELEM(4, 3, id_typename_offset_const), \
+ >::type \
+ ) \
+ BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THIS_BACK( \
+ BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE( \
+ bind_var_without_type)), \
         this_ BOOST_PP_TUPLE_EAT(1) \
     , \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE \
- )(bind_traits)
+ BOOST_PP_TUPLE_REM(1) \
+ )(bind_var_without_type)
 
 // Adapted from `BOOST_SCOPE_EXIT_AUX_ARG_DECL()`.
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_ENUM_( \
- r, id_typename_offset, i, bind_traits, is_const) \
+ r, id_typename_offset_const, i, bind_traits) \
     BOOST_PP_COMMA_IF(i) /* enumeration commas */ \
     BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_( \
- r, id_typename_offset, i, bind_traits, is_const)
-
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_DECL_ENUM_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_ENUM_( \
- r, id_typename_offset, i, bind_traits, 0 /* do not force const */)
-
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_BIND_DECL_ENUM_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_ENUM_( \
- r, id_typename_offset, i, bind_traits, 1 /* force const */)
+ r, id_typename_offset_const, i, \
+ BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE(bind_traits))
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_DECL_( \
- r, id_typename_offset, i, bind_traits, is_const) \
+ r, id_typename_offset_const, i, bind_traits) \
     BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_( \
- r, id_typename_offset, i, \
+ r, id_typename_offset_const, i, \
             & /* all bind member vars are refs to ScopeExit struct members */ \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_VAR_( \
- BOOST_PP_ADD(i, BOOST_PP_TUPLE_ELEM(3, 2, \
- id_typename_offset))), \
- is_const) \
+ BOOST_PP_ADD(i, BOOST_PP_TUPLE_ELEM(4, 2, \
+ id_typename_offset_const)))) \
     ; /* end member variable declaration */
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECL_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_DECL_( \
- r, id_typename_offset, i, bind_traits, 0 /* do not force const */)
-
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_BIND_MEMBER_DECL_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_DECL_( \
- r, id_typename_offset, i, bind_traits, 1 /* force const */)
-
 // Adapted from `BOOST_SCOPE_EXIT_AUX_ARG()`.
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_INIT_ENUM_( \
         r, id_offset, i, bind_traits) \
@@ -225,24 +212,16 @@
 // Typeof type-definitions.
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_TYPEDEF_( \
- r, id_typename_offset, i, bind_traits, is_const) \
+ r, id_typename_offset_const, i, bind_traits) \
     typedef /* the type with the special typeof name */ \
         BOOST_CLOSURE_AUX_CLOSURE_TYPEOF_TYPE( \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_( \
- r, id_typename_offset, i, bind_traits, is_const) \
+ r, id_typename_offset_const, i, \
+ BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE( \
+ bind_traits)) \
         ) \
     ; /* end typedef */
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPEDEF_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_TYPEDEF_( \
- r, id_typename_offset, i, bind_traits, 0 /* do not add const */)
-
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_TYPEDEF_( \
- r, id_typename_offset, i, bind_traits) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_TYPEDEF_( \
- r, id_typename_offset, i, bind_traits, 1 /* add const */)
-
 // Expand to the function type `R (A1, ...)`.
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_( \
         decl_traits, id, has_type, function_type) \
@@ -429,7 +408,7 @@
     /* run-time: do not use base class to allow for compiler optimizations */ \
     { \
         /* function type */ \
- typedef BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_(sign_params, id, \
+ typedef BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_(decl_traits, id, \
                 1 /* has type */, BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_TYPE_); \
         /* functor type -- this type cannot have ID postfix because it is */ \
         /* used the `NAME` macro (this symbol is within functor class so */ \
@@ -449,12 +428,16 @@
         /* given that the var name is always attached to the & symbol plus */ \
         /* programmers can always remove const& using type traits) */ \
         /* const bind typeof types */ \
- BOOST_PP_LIST_FOR_EACH_I(BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_TYPEDEF_,\
- (id, typename01, 0 /* no offset */), const_binds) \
+ BOOST_PP_LIST_FOR_EACH_I( \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_TYPEDEF_,\
+ (id, typename01, 0 /* no offset */, 1 /* const-bind */ ), \
+ const_binds) \
         /* bind typeof types */ \
- BOOST_PP_LIST_FOR_EACH_I(BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPEDEF_, \
+ BOOST_PP_LIST_FOR_EACH_I( \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_TYPEDEF_, \
                 /* offset index with # of preceding const-binds (if any) */ \
- ( id, typename01, BOOST_PP_LIST_SIZE(const_binds) ), binds) \
+ ( id, typename01, BOOST_PP_LIST_SIZE(const_binds), \
+ 0 /* not const-bind */ ), binds) \
         /* const this... */ \
         BOOST_PP_EXPR_IIF(has_const_bind_this, \
             typedef BOOST_CLOSURE_AUX_CLOSURE_TYPEOF_TYPE( \
@@ -510,9 +493,9 @@
             , params, const_binds, has_const_bind_this, binds, has_bind_this \
             , id, typename01 ) \
         ) \
- inline static void BOOST_CLOSURE_AUX_CODE_FUNCTOR_INIT_CALL_FUNC( \
+ inline static void BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC( \
                 void* object, BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPE& functor) { \
- functor.BOOST_CLOSURE_AUX_CODE_FUNCTOR_INIT_CALL_FUNC(object, \
+ functor.BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC(object, \
                 BOOST_PP_ENUM( \
                         /* PP_INC to handle no dflt (EXPAND for MVSC) */ \
                         BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
@@ -525,12 +508,14 @@
         /* references to the ScopeExit struct instead of accessing the bind */ \
         /* struct at each call (these mem refs are init by the constructor) */ \
         BOOST_PP_LIST_FOR_EACH_I( /* const bind member references */ \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_BIND_MEMBER_DECL_,\
- ( id, typename01, 0 /* no offset */ ), const_binds) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_DECL_,\
+ ( id, typename01, 0 /* no offset */, 1 /* const */ ), \
+ const_binds) \
         BOOST_PP_LIST_FOR_EACH_I( /* bind member references */ \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECL_, \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_MEMBER_DECL_, \
                 /* offset index of # of const-binds (could be 0) */ \
- ( id, typename01, BOOST_PP_LIST_SIZE(const_binds) ), binds) \
+ ( id, typename01, BOOST_PP_LIST_SIZE(const_binds), \
+ 0 /* no const */ ), binds) \
         /* bind this const or not (pointed-const is not added here because */ \
         /* this is a reference, it is added to the this_ body param instead */ \
         BOOST_PP_EXPR_IIF(BOOST_PP_BITOR(has_bind_this, has_const_bind_this), \
@@ -551,8 +536,9 @@
         BOOST_CLOSURE_AUX_CODE_FUNCTOR_BODY_FUNC_( \
                 /* const binds */ \
                 BOOST_PP_LIST_FOR_EACH_I( \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_CONST_BIND_DECL_ENUM_,\
- ( id, typename01, 0 /* no offset */ ), const_binds) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_ENUM_, \
+ ( id, typename01, 0 /* no offset */, 1 /* const */ ), \
+ const_binds) \
                 /* plain binds */ \
                 BOOST_PP_COMMA_IF( \
                     BOOST_PP_BITAND( \
@@ -561,10 +547,10 @@
                     ) \
                 ) \
                 BOOST_PP_LIST_FOR_EACH_I( \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_DECL_ENUM_, \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_DECL_ENUM_, \
                         /* offset index of # of const-binds (could be 0) */ \
- ( id, typename01, BOOST_PP_LIST_SIZE(const_binds) ), \
- binds) \
+ ( id, typename01, BOOST_PP_LIST_SIZE(const_binds), \
+ 0 /* not const-bind */ ), binds) \
                 /* `this` bind */ \
                 BOOST_PP_COMMA_IF( \
                     BOOST_PP_BITAND( \
@@ -617,23 +603,19 @@
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPE \
     BOOST_CLOSURE_AUX_SYMBOL( (functor_type) )
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_INIT_CALL_FUNC \
- BOOST_CLOSURE_AUX_SYMBOL( (init_call) )
-
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR(decl_traits, id, typename01) \
     BOOST_CLOSURE_AUX_CODE_FUNCTOR_(decl_traits, \
             /* params (might have defaults) */ \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits), \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_DEFAULT_COUNT(decl_traits),\
             /* const bind vars (`this` excluded) */ \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS_WITHOUT_TYPE( \
- decl_traits), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits), \
             /* if const bind `this` is present */ \
             BOOST_PP_LIST_IS_CONS( \
                     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
                     decl_traits)), \
             /* bind (non-const) vars (`this` excluded) */ \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS_WITHOUT_TYPE(decl_traits), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits), \
             /* if (non-const) bind `this` is present */ \
             BOOST_PP_LIST_IS_CONS( \
                     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \

Modified: sandbox/closure/boost/closure/aux_/macro/code_/result.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/macro/code_/result.hpp (original)
+++ sandbox/closure/boost/closure/aux_/macro/code_/result.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -7,11 +7,10 @@
 #ifndef BOOST_CLOSURE_AUX_CODE_RESULT_HPP_
 #define BOOST_CLOSURE_AUX_CODE_RESULT_HPP_
 
-/** @todo uncomment these includes */
 #include <boost/closure/aux_/symbol.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_returns.hpp>
-//#include <boost/scope_exit.hpp>
-//#include <boost/typeof/typeof.hpp>
+#include <boost/scope_exit.hpp>
+#include <boost/typeof/typeof.hpp>
 #include <boost/type_traits/remove_pointer.hpp>
 #include <boost/type_traits/function_traits.hpp>
 #include <boost/preprocessor/control/iif.hpp>

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -24,18 +24,6 @@
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_BINDS, decl_traits)
 
-// Expand: pp-list of non-const bind-traits without explicit types.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS_WITHOUT_TYPE(decl_traits) \
- BOOST_PP_LIST_TRANSFORM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_APPLY_, \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_WITHOUT_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list of non-const bind-traits with explicit types.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS_WITH_TYPE(decl_traits) \
- BOOST_PP_LIST_TRANSFORM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_APPLY_, \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_WITH_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
 // Expand: pp-list non-const bind-this-traits (size <= 1 after validation).
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -25,19 +25,6 @@
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_CONST_BINDS, decl_traits)
 
-// Expand: pp-list of const bind-traits without explicit type.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS_WITHOUT_TYPE( \
- decl_traits) \
- BOOST_PP_LIST_TRANSFORM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_APPLY_,\
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ANY_BIND_WITHOUT_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND(decl_traits))
-
-// Expand: pp-list of const bind-traits with explicit type.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS_WITH_TYPE(decl_traits) \
- BOOST_PP_LIST_TRANSFORM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_APPLY_,\
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ANY_BIND_WITH_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND(decl_traits))
-
 // Expand: pp-list of const bind-this-traits (size <= 1 after validation).
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \

Modified: sandbox/closure/boost/closure/config.hpp
==============================================================================
--- sandbox/closure/boost/closure/config.hpp (original)
+++ sandbox/closure/boost/closure/config.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -9,58 +9,12 @@
  * at compile-time.
  */
 
-#ifndef BOOST_LOCAL_CONFIG_HPP_
-#define BOOST_LOCAL_CONFIG_HPP_
+#ifndef BOOST_CLOSURE_CONFIG_HPP_
+#define BOOST_CLOSURE_CONFIG_HPP_
 
-/**
- * @brief Force to use only pure C++03 standard features.
- *
- * If programmers leave this configuration macro undefined, its default
- * value is to be left not defined.
- *
- * If this macro is defined, variadic macros and empty macro parameters are not
- * used by this library. Using variadic macros and empty macro parameters
- * allows this library to provide the <em>variadic macro</em> and <em>empty
- * macro</em> syntaxes which some programmers might find more readable than the
- * <em>sequencing macro</em> syntax (see the @RefSect{Tutorial} section,
- * @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS}, @RefMacro{BOOST_LOCAL_BLOCK}, and
- * @RefMacro{BOOST_LOCAL_EXIT}). If this configuration macro is defined then
- * only the sequencing macro syntax is allowed (regardless of whether the
- * compiler supports variadic and empty macros or not).
- *
- * @Warning The variadic and empty macro syntaxes are not supported by all C++
- * compilers so they should be used with care to avoid portability issues
- * (and this configuration macro can be defined to disable them).
- * Variadic macros, are supported by most recent compilers (like MSVC and
- * GCC), they were first introduced by the C99 standard, they are part of the
- * C++11 standard, but they are not part of the C++03 standard.
- * Empty macro parameters are also supported by the C99 standards and they are
- * part of the C++11 standard, but they are not supported by all modern
- * compilers (for example, they are not supported by MSVC).
- *
- * Furthermore, if this macro is defined then the library will not take advantage of
- * compilers that allow to pass local types as template parameters (e.g., MSVC
- * and C++11 compilers) in order to generate code that has more chances to be
- * optimized by the compiler for faster run-times (i.e., inlining the local
- * function calls, see the @RefSect2{Advanced_Topics, Advanced Topics}
- * section).
- *
- * @Note This library internally uses Boost.Typeof to automatically deduce
- * the bound variable types. The macro symbol <a href='http://www.boost.org/doc/libs/1_46_1/doc/html/typeof/refe.html#typeof.compl'><c>BOOST_TYPEOF_COMPLIANT</c></a>
- * needs to be defined separately from this configuration macro if programmers
- * do not want to use non C++03 standard support for type deduction
- * operations.
- *
- * @See @RefSect{Tutorial} section, @RefSect2{Advanced_Topics, Advanced Topics}
- * section, @RefSect2{Getting_Started, Getting Started} section.
- */
-#ifndef BOOST_LOCAL_CONFIG_COMPLIANT
-#undef BOOST_LOCAL_CONFIG_COMPLIANT
-#else
-// Undefine and define again for doxygen comment above.
-#undef BOOST_LOCAL_CONFIG_COMPLIANT
-#define BOOST_LOCAL_CONFIG_COMPLIANT
-#endif
+#include <boost/config_ext.hpp>
+
+// User defined.
 
 /**
  * @brief Maximum number of function parameters supported for the local
@@ -79,53 +33,16 @@
  * @See @RefSect{Tutorial} section, @RefSect2{Getting_Started, Getting Started}
  * section.
  */
-#ifndef BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX
-#define BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX 5
+#ifndef BOOST_CLOSURE_CONFIG_FUNCTION_ARITY_MAX
+# define BOOST_CLOSURE_CONFIG_FUNCTION_ARITY_MAX 5
 #endif
 
-/**
- * @brief The number of function types that can be overloaded by the
- * @RefClass{boost::local::function::overload} functor.
- *
- * If programmers leave this configuration macro undefined, its default
- * value is <c>6</c>.
- *
- * This number must be greater or equal than 2 (because at least two function
- * types are needed to define an overloaded call operator) otherwise the
- * library will generate a compile-time error.
- *
- * @Warning Increasing this number will increase compilation time when the
- * header file <c>"boost/local/function/overload.hpp"</c> is included.
- *
- * @See @RefSect2{Advanced_Topics, Advanced Topics} section,
- * @RefSect2{Getting_Started, Getting Started} section.
- */
-#ifndef BOOST_LOCAL_CONFIG_OVERLOAD_MAX
-#define BOOST_LOCAL_CONFIG_OVERLOAD_MAX 6
-#endif
-#if BOOST_LOCAL_CONFIG_OVERLOAD_MAX < 2
-#error "BOOST_LOCAL_CONFIG_OVERLOAD_MAX must be grater or equal than 2"
-#endif
+// For internal library use.
 
-/**
- * @brief The name of the special symbol used to access the bound object
- * <c>this</c> within the body of the local constructs.
- *
- * If programmers leave this configuration macro undefined, the default
- * symbol used is <c>this_</c> (this default symbol follows Boost's conventions
- * to postfix with an underscore symbols that refer to C++ keywords -- the
- * <c>this</c> keyword in this case).
- *
- * @Warning Programmers should not define this macro unless it is absolutely
- * necessary (e.g., to avoid name clashes with another library which cannot be
- * changed). Changing the symbol <c>this_</c> effectively changes the public
- * API of this library.
- *
- * @See @RefSect{Tutorial} section, @RefSect2{Getting_Started, Getting Started}
- * section.
- */
-#ifndef BOOST_LOCAL_CONFIG_THIS_PARAM_NAME
-#define BOOST_LOCAL_CONFIG_THIS_PARAM_NAME this_
+#if defined(BOOST_LOCAL_TYPES_AS_TEMPLATE_PARAMS)
+# define BOOST_CLOSURE_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 1
+#else
+# define BOOST_CLOSURE_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 0
 #endif
 
 #endif // #include guard

Copied: sandbox/closure/boost/config_ext.hpp (from r76043, /sandbox/closure/boost/boost_config.hpp)
==============================================================================
--- /sandbox/closure/boost/boost_config.hpp (original)
+++ sandbox/closure/boost/config_ext.hpp 2011-12-19 16:58:55 EST (Mon, 19 Dec 2011)
@@ -4,8 +4,8 @@
 // License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
-#ifndef BOOST_CONFIG_HPP_
-#define BOOST_CONFIG_HPP_
+#ifndef BOOST_CONFIG_EXT_HPP_
+#define BOOST_CONFIG_EXT_HPP_
 
 #include <boost/config.hpp>
 


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