Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76551 - in sandbox/closure/boost: . closure/aux_/macro closure/aux_/macro/code_ closure/aux_/preprocessor/traits closure/aux_/preprocessor/traits/decl_sign_ closure/aux_/preprocessor/traits/decl_sign_/validate_ closure/detail/preprocessor closure/detail/preprocessor/variadic functional functional/detail
From: lorcaminiti_at_[hidden]
Date: 2012-01-17 10:17:00


Author: lcaminiti
Date: 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
New Revision: 76551
URL: http://svn.boost.org/trac/boost/changeset/76551

Log:
Adding overload and make_overload to Boost.Functional.
Removed:
   sandbox/closure/boost/closure/detail/preprocessor/variadic/
Text files modified:
   sandbox/closure/boost/closure.hpp | 99 ++++++++++-------
   sandbox/closure/boost/closure/aux_/macro/closure.hpp | 33 ++---
   sandbox/closure/boost/closure/aux_/macro/code_/bind.hpp | 6
   sandbox/closure/boost/closure/aux_/macro/code_/functor.hpp | 216 ++++++++++++++++++---------------------
   sandbox/closure/boost/closure/aux_/macro/code_/result.hpp | 9
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl.hpp | 13 -
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/sign.hpp | 12 +-
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate.hpp | 2
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/defaults.hpp | 22 ++--
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp | 4
   sandbox/closure/boost/closure/detail/preprocessor/line_counter.hpp | 2
   sandbox/closure/boost/functional/detail/overload_base.hpp | 73 ++++++------
   sandbox/closure/boost/functional/overload.hpp | 186 ++++++++++++++++++++--------------
   13 files changed, 351 insertions(+), 326 deletions(-)

Modified: sandbox/closure/boost/closure.hpp
==============================================================================
--- sandbox/closure/boost/closure.hpp (original)
+++ sandbox/closure/boost/closure.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -5,27 +5,66 @@
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
 /** @file
- * @brief Local functions allows to program functions locally within the scope
- * where they are needed.
- */
+@brief Local functions allows to program functions locally within the scope
+where they are needed.
+*/
 
 #ifndef BOOST_CLOSURE_HPP_
 #define BOOST_CLOSURE_HPP_
 
+#ifndef DOXY
+
 #include <boost/closure/aux_/macro/closure.hpp>
 #include <boost/closure/aux_/macro/closure_end.hpp>
 #include <boost/closure/aux_/macro/closure_typeof.hpp>
-#include <boost/config.hpp> // For variadic macros.
+#include <boost/closure/aux_/preprocessor/traits/decl.hpp>
+#include <boost/closure/detail/preprocessor/line_counter.hpp>
+#include <boost/closure/detail/preprocessor/void_list.hpp>
+#include <boost/config.hpp>
+
+// PUBLIC //
+
+#ifdef BOOST_NO_VARIADIC_MACROS
+# define BOOST_CLOSURE(declarations) \
+ BOOST_CLOSURE_AUX_CLOSURE( \
+ BOOST_CLOSURE_DETAIL_PP_LINE_COUNTER \
+ , 0 /* not within template */ \
+ , BOOST_CLOSURE_AUX_PP_DECL_TRAITS( \
+ BOOST_CLOSURE_DETAIL_PP_VOID_LIST(declarations)) \
+ )
+# define BOOST_CLOSURE_TPL(declarations) \
+ BOOST_CLOSURE_AUX_CLOSURE( \
+ BOOST_CLOSURE_DETAIL_PP_LINE_COUNTER \
+ , 1 /* within template */ \
+ , BOOST_CLOSURE_AUX_PP_DECL_TRAITS( \
+ BOOST_CLOSURE_DETAIL_PP_VOID_LIST(declarations)) \
+ )
+#else // VARIADIC
+# define BOOST_CLOSURE(...) \
+ BOOST_CLOSURE_AUX_CLOSURE( \
+ BOOST_CLOSURE_DETAIL_PP_LINE_COUNTER \
+ , 0 /* not within template */ \
+ , BOOST_CLOSURE_AUX_PP_DECL_TRAITS( \
+ BOOST_CLOSURE_DETAIL_PP_VOID_LIST(__VA_ARGS__)) \
+ )
+# define BOOST_CLOSURE_TPL(...) \
+ BOOST_CLOSURE_AUX_CLOSURE( \
+ BOOST_CLOSURE_DETAIL_PP_LINE_COUNTER \
+ , 1 /* within template */ \
+ , BOOST_CLOSURE_AUX_PP_DECL_TRAITS( \
+ BOOST_CLOSURE_DETAIL_PP_VOID_LIST(__VA_ARGS__)) \
+ )
+#endif // VARIADIC
+
+#define BOOST_CLOSURE_END(function_name) \
+ BOOST_CLOSURE_AUX_CLOSURE_END(function_name)
+
+#define BOOST_CLOSURE_TYPEOF(bound_variable_name) \
+ BOOST_CLOSURE_AUX_CLOSURE_TYPEOF(bound_variable_name)
 
-// Pass a parenthesized params seq `()()...` on C++. If variadic macros (C99,
-// GCC, MVSC, etc) you can also pass a variable length tuple `..., ...` for
-// params and nothing `` for no params.
-#if defined(BOOST_NO_VARIADIC_MACROS)
-
-/** @cond */
-#define BOOST_CLOSURE_(id, is_template, decl_seq) \
- BOOST_CLOSURE_AUX_CLOSURE(decl_seq, id, is_template)
-/** @endcond */
+// DOCUMENTATION //
+
+#else // DOXY
 
 /**
  * @brief This macro is used to declare the local function parameters.
@@ -141,8 +180,7 @@
  * @RefMacro{BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX},
  * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}, Boost.Function.
  */
-#define BOOST_CLOSURE(declarations) \
- BOOST_CLOSURE_(__LINE__, 0 /* no template */, declarations)
+#define BOOST_CLOSURE(declarations)
 
 /**
  * @brief This macro is the same as @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS} but
@@ -150,25 +188,7 @@
  *
  * @See @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS}, @RefSect{Tutorial} section.
  */
-#define BOOST_CLOSURE_TPL(declarations) \
- BOOST_CLOSURE_(__LINE__, 1 /* template */, declarations)
-
-#else // BOOST_NO_VARIADIC_MACROS
-
-#include <boost/closure/detail/preprocessor/variadic/to_seq.hpp>
-
-#define BOOST_CLOSURE_(id, is_template, ...) \
- BOOST_CLOSURE_AUX_CLOSURE(BOOST_CLOSURE_DETAIL_PP_VARIADIC_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__), \
- id, is_template)
-
-#define BOOST_CLOSURE(...) \
- BOOST_CLOSURE_(__LINE__, 0 /* no template */, __VA_ARGS__)
-
-#define BOOST_CLOSURE_TPL(...) \
- BOOST_CLOSURE_(__LINE__, 1 /* template */, __VA_ARGS__)
-
-#endif // BOOST_NO_VARIADIC_MACROS
+#define BOOST_CLOSURE_TPL(declarations)
 
 /**
  * @brief This macro is used to specify the local function name.
@@ -224,12 +244,8 @@
  * @RefSect2{Advanced_Topics, Advanced Topics} section,
  * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}.
  */
-#define BOOST_CLOSURE_END(name) \
- BOOST_CLOSURE_AUX_CLOSURE_END(name)
+#define BOOST_CLOSURE_END(name)
 
-// Bound variable name. Expand to qualified bound type (i.e., bound variable
-// type with extra const and/or & for const and/or reference binds).
-// Can be used with local functions, blocks, and exits. It accepts `this`.
 /**
  * @brief This macro expands to the fully qualified type of a variable bound
  * to to local functions, local blocks, and local exits.
@@ -262,8 +278,9 @@
  * @RefMacro{BOOST_LOCAL_EXIT}, @RefSect2{Advanced_Topics, Advanced Topics}
  * section.
  */
-#define BOOST_CLOSURE_TYPEOF(bound_variable_name) \
- BOOST_CLOSURE_AUX_CLOSURE_TYPEOF(bound_variable_name)
+#define BOOST_CLOSURE_TYPEOF(bound_variable_name)
+
+#endif // DOXY
 
 #endif // #include guard
 

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 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -19,14 +19,17 @@
 #include <boost/preprocessor/list/adt.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
 
+/** @todo double check all includes */
+/** @todo add copyright to all files, docs, examples, tests, etc- careful with ScopeExit */
+
 // PRIVATE //
 
-#define BOOST_CLOSURE_AUX_CLOSURE_OK_(decl_traits, id, typename01) \
- BOOST_CLOSURE_AUX_CODE_RESULT(decl_traits, id, typename01) \
- BOOST_CLOSURE_AUX_CODE_BIND(decl_traits, id, typename01) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR(decl_traits, id, typename01)
+#define BOOST_CLOSURE_AUX_CLOSURE_OK_(id, typename01, decl_traits) \
+ BOOST_CLOSURE_AUX_CODE_RESULT(id, typename01, decl_traits) \
+ BOOST_CLOSURE_AUX_CODE_BIND(id, typename01, decl_traits) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR(id, typename01, decl_traits)
 
-#define BOOST_CLOSURE_AUX_CLOSURE_ERROR_(decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CLOSURE_ERROR_(id, typename01, decl_traits) \
     BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS( \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS(decl_traits)), \
         /* return specified, so no result type before this macro expansion */ \
@@ -41,15 +44,6 @@
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits), ()) \
     ; /* must close ASSERT macro for eventual use within class scope */
 
-// sign_params: parsed parenthesized params.
-#define BOOST_CLOSURE_AUX_CLOSURE_(decl_traits, id, typename01) \
- BOOST_PP_IIF(BOOST_PP_IS_EMPTY(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR_MSG( \
- decl_traits)), \
- BOOST_CLOSURE_AUX_CLOSURE_OK_ \
- , \
- BOOST_CLOSURE_AUX_CLOSURE_ERROR_ \
- )(decl_traits, id, typename01)
-
 // PUBLIC //
 
 #define BOOST_CLOSURE_AUX_CLOSURE_ARGS_VAR \
@@ -59,9 +53,14 @@
 // this variable is made using SFINAE mechanisms by each local function macro.
 extern boost::scope_exit::detail::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)
+// sign_params: parsed parenthesized params.
+#define BOOST_CLOSURE_AUX_CLOSURE(id, typename01, decl_traits) \
+ BOOST_PP_IIF(BOOST_PP_IS_EMPTY( \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits)), \
+ BOOST_CLOSURE_AUX_CLOSURE_OK_ \
+ , \
+ BOOST_CLOSURE_AUX_CLOSURE_ERROR_ \
+ )(id, typename01, decl_traits)
 
 #endif // #include guard
 

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 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -177,7 +177,7 @@
                 all_binds) \
     };
 
-#define BOOST_CLOSURE_AUX_CODE_BIND_(decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_BIND_(id, typename01, decl_traits) \
     /* 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 */ \
@@ -200,14 +200,14 @@
 #define BOOST_CLOSURE_AUX_CODE_BIND_THIS_VAR \
     BOOST_CLOSURE_AUX_SYMBOL( (this_var) )
 
-#define BOOST_CLOSURE_AUX_CODE_BIND(decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_BIND(id, typename01, decl_traits) \
     /* the binding data structures must be declared and initialized (to */ \
     /* empty structs, so hopefully the compiler will optimize away the */ \
     /* no-op code) even when there is no bound param because these structs */ \
     /* are used to init `...args.value` which is always used by the `END` */ \
     /* macro later because this macro does not know if there are bound */ \
     /* params or not */ \
- BOOST_CLOSURE_AUX_CODE_BIND_(decl_traits, id, typename01) \
+ BOOST_CLOSURE_AUX_CODE_BIND_(id, typename01, decl_traits) \
     /* this code takes advantage of the template argument list/comparison */ \
     /* operator ambiguity to declare a variable iff it hasn't already been */ \
     /* declared in that scope; the second occurrence is parsed as: */ \

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 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -306,7 +306,7 @@
 
 // Expand to the function type `R (A1, ...)`.
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_( \
- decl_traits, id, has_type, function_type) \
+ id, decl_traits, has_type, function_type) \
     BOOST_CLOSURE_AUX_CODE_RESULT_TYPE(id) \
     BOOST_PP_EXPR_IIF(has_type, (function_type) ) \
     ( \
@@ -318,11 +318,10 @@
 
 // Functor call operations.
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_( \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_(id, typename01, \
         const_bind_macro, bind_macro, const_bind_this_macro, bind_this_macro, \
- param_macro, \
- params, const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ param_macro, params, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     BOOST_CLOSURE_AUX_CODE_FUNCTOR_BODY_FUNC_( \
         BOOST_PP_LIST_FOR_EACH_I(const_bind_macro, \
                 0 /* no offset */, const_binds) \
@@ -364,23 +363,23 @@
         BOOST_PP_LIST_FOR_EACH_I(param_macro, ~, params) \
     )
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_(z, defaults_n, decl_traits, \
- params, const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_(z, defaults_n, \
+ id, typename01, decl_traits, params, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     inline BOOST_CLOSURE_AUX_CODE_RESULT_TYPE(id) operator()( \
         BOOST_PP_LIST_FOR_EACH_I( \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_PARAM_ARG_DECL_ENUM_, \
                 typename01, params) \
     ) const { \
         /* just forward call to member function with local func name */ \
- return BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_( \
+ return BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_(id, typename01, \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_MEMBER_BIND_ENUM_, \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_MEMBER_BIND_ENUM_, \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_THIS_, \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_THIS_, \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_PARAM_ARG_NAME_ENUM_, \
                 params, const_binds, has_const_bind_this, binds, \
- has_bind_this, id, typename01); \
+ has_bind_this); \
     }
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_FUNC_( \
@@ -393,8 +392,7 @@
 
 // Precondition: !CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_COMMA_BIND_PARAM_DECLS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ id, typename01, const_binds, has_const_bind_this, binds, has_bind_this)\
     BOOST_PP_LIST_FOR_EACH_I( \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_MAYBECONST_BIND_PARAM_DECL_, \
             ( id, typename01, 0 /* no offset */, 1 /* const */ ), const_binds) \
@@ -420,30 +418,27 @@
                     binds)))), \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_NOBIND_PARAM_DECL_, ~)
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_OPERATOR_( \
- params, const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_OPERATOR_(id, typename01, \
+ params, const_binds, has_const_bind_this, binds, has_bind_this) \
     operator()( \
         BOOST_PP_LIST_FOR_EACH_I( \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_PARAM_ARG_NAME_ENUM_, ~, \
                 params) \
     )
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_BODY_( \
- params, const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_( \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_BODY_(id, typename01, \
+ params, const_binds, has_const_bind_this, binds, has_bind_this) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_BODY_(id, typename01, \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_PARAM_ENUM_, \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_MAYBECONST_BIND_PARAM_ENUM_, \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_THIS_PARAM_, \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_THIS_PARAM_, \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_PARAM_ARG_NAME_ENUM_, \
- params, const_binds, has_const_bind_this, binds, \
- has_bind_this, id, typename01)
+ params, const_binds, has_const_bind_this, binds, has_bind_this)
 
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_(z, defaults_n, \
- decl_traits, params, const_binds, has_const_bind_this, binds, \
- has_bind_this, id, typename01) \
+ id, typename01, decl_traits, params, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     inline static BOOST_CLOSURE_AUX_CODE_RESULT_TYPE(id) \
     BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_FUNC_(z, defaults_n, ~)( \
         void* object \
@@ -452,8 +447,8 @@
             BOOST_PP_TUPLE_EAT(6) \
         , \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_COMMA_BIND_PARAM_DECLS_ \
- )(const_binds, has_const_bind_this, binds, has_bind_this, id, \
- typename01) \
+ )(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
         BOOST_PP_LIST_FOR_EACH_I( \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_PARAM_ARG_DECL_, \
                 typename01, params) \
@@ -474,47 +469,46 @@
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_OPERATOR_ \
             , \
                 BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_BODY_ \
- )(params, const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ )(id, typename01, params, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
         ; \
     }
         
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_(z, n, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_(z, defaults_n, \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
     BOOST_PP_EXPAND( \
     BOOST_PP_TUPLE_ELEM(9, 0, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- ( z, n \
- , BOOST_PP_TUPLE_ELEM(9, 1, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_LIST_FIRST_N(BOOST_PP_SUB(BOOST_PP_LIST_SIZE( \
- /* remove last n default params */ \
- BOOST_PP_TUPLE_ELEM(9, 2, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename)),\
- n), \
- BOOST_PP_TUPLE_ELEM(9, 2, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename)) \
- , BOOST_PP_TUPLE_ELEM(9, 3, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_TUPLE_ELEM(9, 4, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_TUPLE_ELEM(9, 5, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_TUPLE_ELEM(9, 6, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_TUPLE_ELEM(9, 7, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
- , BOOST_PP_TUPLE_ELEM(9, 8, \
- op_decl_params_constbinds_hasconstthis_binds_hasthis_id_typename) \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ ( z, defaults_n \
+ , BOOST_PP_TUPLE_ELEM(9, 1, /* id */\
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_TUPLE_ELEM(9, 2, /* typename01 */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_TUPLE_ELEM(9, 3, /* decl_traits */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_LIST_FIRST_N( /* remove last n default params */ \
+ BOOST_PP_SUB(BOOST_PP_LIST_SIZE(BOOST_PP_TUPLE_ELEM(9, 4, \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis)),\
+ defaults_n) \
+ , BOOST_PP_TUPLE_ELEM(9, 4, \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ ) \
+ , BOOST_PP_TUPLE_ELEM(9, 5, /* const_binds */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_TUPLE_ELEM(9, 6, /* has_const_bind_this */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_TUPLE_ELEM(9, 7, /* binds */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
+ , BOOST_PP_TUPLE_ELEM(9, 8, /* has_bind_this */ \
+ op_id_typename_decl_params_constbinds_hasconstthis_binds_hasthis) \
     ) /* end `op_macro(...)` */ \
     ) /* end expand */
 
 // Functor binds.
             
 // Precondition: !CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS.
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_BIND_TYPES_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_BIND_TYPES_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     BOOST_PP_LIST_FOR_EACH_I( \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_MAYBECONST_BIND_TYPE_, \
             ( id, typename01, 0 /* no offset */, 1 /* const */ ), \
@@ -539,9 +533,8 @@
             )(BOOST_PP_LIST_SIZE(BOOST_PP_LIST_APPEND(const_binds, binds)))), \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_NOBIND_TYPE_, ~)
         
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_TYPEOF_TYPEDEFS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_TYPEOF_TYPEDEFS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     /* typeof types -- these types are qualified with extra eventual */ \
     /* const and/or & if their variables are bound by const and/or & */ \
     /* (this is because it is not possible to strip the eventual & */ \
@@ -576,9 +569,8 @@
         ) ; /* close typedef */ \
     )
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECLS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECLS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     /* run-time: it is faster if call `operator()` just accesses member */ \
     /* references to the ScopeExit struct instead of accessing the bind */ \
     /* struct at each call (these mem refs are init by the constructor) */ \
@@ -599,9 +591,8 @@
         ; /* end member variable declaration */ \
     )
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_STATIC_BINDS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_STATIC_BINDS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     BOOST_PP_LIST_FOR_EACH_I( \
         BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_MAYBECONST_STATIC_BIND_MEMBER_, \
         ( id, typename01, 0 /* no offset */, 1 /* const */ ), const_binds) \
@@ -627,9 +618,8 @@
 
 // Functor inits.
         
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MEMBER_INITS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_MEMBER_INITS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     BOOST_PP_EXPR_IIF(BOOST_PP_BITOR(BOOST_PP_BITOR(BOOST_PP_BITOR( \
             BOOST_PP_LIST_IS_CONS(const_binds), BOOST_PP_LIST_IS_CONS(binds)),\
             has_bind_this), has_const_bind_this), \
@@ -670,14 +660,13 @@
 
 // Functor class.
 
-#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_(decl_traits, params, default_count, \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR_(id, typename01, decl_traits, params, \
+ default_count, const_binds, has_const_bind_this, binds, has_bind_this) \
     class BOOST_CLOSURE_AUX_CODE_FUNCTOR_CLASS_TYPE_(id) \
     /* run-time: do not use base class to allow for compiler optimizations */ \
     { \
         /* function type */ \
- typedef BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_(decl_traits, id, \
+ typedef BOOST_CLOSURE_AUX_CODE_FUNCTOR_F_(id, decl_traits, \
                 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 */ \
@@ -692,15 +681,14 @@
                         BOOST_PP_TUPLE_EAT(6) \
                     , \
                         BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_BIND_TYPES_ \
- )(const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ )(id, typename01, const_binds, has_const_bind_this, \
+ binds, has_bind_this) \
> \
             )) \
             BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPE \
         ; \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_TYPEOF_TYPEDEFS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_TYPEOF_TYPEDEFS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
     public: \
         /* public trait interface following Boost.FunctionTraits names */ \
         /* (traits must be defined in both this and the global functor) */ \
@@ -715,20 +703,19 @@
             /* NOTE: there is no way to wrap member initializer commas */ \
             /* within paren so you must handle these commas manually if */ \
             /* expanding this macro within another macro */ \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_MEMBER_INITS_(const_binds, \
- has_const_bind_this, binds, has_bind_this, id, typename01) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_MEMBER_INITS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
         { /* do nothing */ } \
         /* run-time: implement `operator()` (and for all default params) so */ \
         /* this obj can be used directly as a functor for C++03 extensions */ \
         /* and optimized macros */ \
         BOOST_PP_REPEAT( \
- /* PP_INC to handle no dflt (EXPAND for MVSC) */ \
- BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_,\
- ( BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_, decl_traits, params \
- , const_binds, has_const_bind_this, binds, has_bind_this, id \
- , typename01 ) \
- ) \
+ /* PP_INC to handle no dflt (EXPAND for MVSC) */ \
+ BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_,\
+ ( BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_, id, typename01 \
+ , decl_traits, params, const_binds, has_const_bind_this, binds \
+ , has_bind_this ) ) \
         /* compliance: trick to pass this local class as a template param */ \
         /* on pure C++03 without non C++03 extension */ \
         /* performance: this trick introduced _one_ indirect function call */ \
@@ -739,13 +726,12 @@
         /* call trick" measured longer run-times than this "static call */ \
         /* trick") */ \
         BOOST_PP_REPEAT( \
- /* PP_INC to handle no dflt (EXPAND for MVSC) */ \
- BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_,\
- ( BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_, decl_traits \
- , params, const_binds, has_const_bind_this, binds, has_bind_this \
- , id, typename01 ) \
- ) \
+ /* PP_INC to handle no dflt (EXPAND for MVSC) */ \
+ BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_CALL_FOR_DEFAULTS_,\
+ ( BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_, id, typename01 \
+ , decl_traits, params, const_binds, has_const_bind_this, binds \
+ , has_bind_this ) ) \
         inline static void BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC( \
                 void* object, BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPE& functor) { \
             functor.BOOST_CLOSURE_AUX_FUNCTION_INIT_CALL_FUNC( \
@@ -755,8 +741,8 @@
                         BOOST_PP_TUPLE_EAT(6) \
                     , \
                         BOOST_CLOSURE_AUX_CODE_FUNCTOR_COMMA_STATIC_BINDS_ \
- )(const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ )(id, typename01, const_binds, has_const_bind_this, \
+ binds, has_bind_this) \
                 BOOST_PP_REPEAT( /* INC to handle no dflt (EXPAND for MVSC) */ \
                         BOOST_PP_EXPAND(BOOST_PP_INC(default_count)), \
   BOOST_CLOSURE_AUX_CODE_FUNCTOR_STATIC_CALL_COMMA_FUNC_ADDR_, \
@@ -764,9 +750,8 @@
             ); \
         } \
     private: \
- BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECLS_( \
- const_binds, has_const_bind_this, binds, has_bind_this, \
- id, typename01) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_BIND_MEMBER_DECLS_(id, typename01, \
+ const_binds, has_const_bind_this, binds, has_bind_this) \
         /* this decl allows for nesting (local functions, etc) as */ \
         /* it makes the args variable visible within the body code (which */ \
         /* cannot be static); this is for compilation only as the args */ \
@@ -847,25 +832,24 @@
 #define BOOST_CLOSURE_AUX_CODE_FUNCTOR_TYPE \
     BOOST_CLOSURE_AUX_SYMBOL( (functor_type) )
 
-#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(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(decl_traits), \
- /* if (non-const) bind `this` is present */ \
- BOOST_PP_LIST_IS_CONS( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
- decl_traits)), \
- /* etc */ \
- id, typename01)
+#define BOOST_CLOSURE_AUX_CODE_FUNCTOR(id, typename01, decl_traits) \
+ BOOST_CLOSURE_AUX_CODE_FUNCTOR_(id, typename01, 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(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(decl_traits) \
+ /* if (non-const) bind `this` is present */ \
+ , BOOST_PP_LIST_IS_CONS( \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
+ decl_traits)) \
+ )
 
 #endif // #include guard
 

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 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -42,7 +42,7 @@
     BOOST_CLOSURE_AUX_SYMBOL( (deduce_result_function_type)(id) )
 
 // User did not explicitly specified result type, deduce it (using Typeof).
-#define BOOST_CLOSURE_AUX_CODE_RESULT_DEDUCE_(decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_RESULT_DEDUCE_(id, typename01, decl_traits) \
     BOOST_CLOSURE_AUX_CODE_RESULT_DECL(id) \
     /* the many tagging, wrapping, etc that follow are taken from ScopeExit */ \
     /* type deduction mechanism and they are necessary within templates */ \
@@ -85,8 +85,7 @@
     ;
 
 // Use result type as explicitly specified by user (no type deduction needed).
-#define BOOST_CLOSURE_AUX_CODE_RESULT_RETURN_( \
- decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_RESULT_RETURN_(id, typename01, decl_traits) \
     typedef \
         BOOST_PP_LIST_FIRST(BOOST_CLOSURE_AUX_DECL_TRAITS_RETURNS( \
                 decl_traits)) \
@@ -101,13 +100,13 @@
 #define BOOST_CLOSURE_AUX_CODE_RESULT_DECL(id) \
     /* result type here */ (*BOOST_CLOSURE_AUX_CODE_RESULT_FUNC_(id))();
 
-#define BOOST_CLOSURE_AUX_CODE_RESULT(decl_traits, id, typename01) \
+#define BOOST_CLOSURE_AUX_CODE_RESULT(id, typename01, decl_traits) \
     BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_DECL_TRAITS_RETURNS( \
             decl_traits)), \
         BOOST_CLOSURE_AUX_CODE_RESULT_RETURN_ \
     , \
         BOOST_CLOSURE_AUX_CODE_RESULT_DEDUCE_ \
- )(decl_traits, id, typename01)
+ )(id, typename01, decl_traits)
 
 #endif // #include guard
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -7,27 +7,22 @@
 #ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HPP_
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HPP_
 
-#include <boost/closure/aux_/preprocessor/traits/decl_sign_/is_void.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_sign_/sign.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_/nil.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/list/adt.hpp>
 
 // PUBLIC //
 
 // Expand: decl_traits (see DECL_TRAITS macros to inspect these traits).
-// declaration_seq: empty ``, or `void`, or `(void)` for no params; or,
-// `{ ([auto | register] type_ name_)[(default value_)] |
-// ([const] bind[(type_)] [&] var_) }+ [(return result_type)]` where `var_` can
-// be `this_` (but not `&this_` allowed as usual in C++).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS(declaration_seq) \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_IS_VOID( \
- declaration_seq), \
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS(declarations) \
+ BOOST_PP_IIF(BOOST_PP_LIST_IS_NIL(declarations), \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_NIL \
         BOOST_PP_TUPLE_EAT(1) \
     , \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN \
- )(declaration_seq)
+ )(declarations)
 
 #endif // #include guard
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/sign.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/sign.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/sign.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -20,7 +20,7 @@
 #include <boost/closure/detail/preprocessor/keyword/thisunderscore.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
 
 // PRIVATE //
 
@@ -92,17 +92,17 @@
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_APPEND_PARAM \
     ))))(decl_traits, sign)
 
-// Parse param seq after following precondition has been validated by caller.
-// Precondition: If seq contains a default param value `... (default ...) ...`,
+// Parse params after following precondition has been validated by caller.
+// Precondition: If list contains a default param value `..., default, ...`,
 // the default value element is never 1st (it always has a previous elem) and
 // its previous element is a unbind param (no const-bind and no bind).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID_SEQ_(sign) \
- BOOST_PP_SEQ_FOLD_LEFT(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID_, \
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID(sign) \
+ BOOST_PP_LIST_FOLD_LEFT(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID_, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_NIL, sign)
 
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_YES_(sign, unused) \
     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID_SEQ_(sign))
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALID(sign))
 
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_NO_(unused, error) \
     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SET_ERROR( \

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -22,7 +22,7 @@
 
 // PUBLIC //
 
-// Validate params seq before starting to parse it.
+// Validate params before starting to parse it.
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE(sign) \
     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_1_(sign, \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS(sign))

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/defaults.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/defaults.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/defaults.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -10,10 +10,11 @@
 #include <boost/closure/detail/preprocessor/keyword/const_bind.hpp>
 #include <boost/closure/detail/preprocessor/keyword/bind.hpp>
 #include <boost/closure/detail/preprocessor/keyword/default.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/control/while.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/facilities/expand.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
 #include <boost/preprocessor/logical/bitand.hpp>
@@ -22,11 +23,10 @@
 #include <boost/preprocessor/comparison/less.hpp>
 #include <boost/preprocessor/arithmetic/inc.hpp>
 #include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/facilities/expand.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/list/size.hpp>
+#include <boost/preprocessor/list/at.hpp>
 
 // PRIVATE //
 
@@ -47,7 +47,7 @@
         sign, index, error) \
     BOOST_PP_IIF( \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS_IS_UNBIND_(\
- BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(index), sign)), \
+ BOOST_PP_LIST_AT(sign, BOOST_PP_DEC(index))), \
         error /* no err, fwd existing one if any */ \
     , \
         BOOST_PP_CAT(BOOST_PP_CAT(ERROR_default_value_at_element_, \
@@ -75,7 +75,7 @@
         BOOST_PP_INC(index) \
     , \
         BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT( \
- BOOST_PP_SEQ_ELEM(index, sign)), \
+ BOOST_PP_LIST_AT(sign, index)), \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS_INDEX_ \
         , \
             error BOOST_PP_TUPLE_EAT(3) /* no err, fwd existing one if any */\
@@ -95,7 +95,7 @@
         sign, index, error) \
     BOOST_PP_BITAND( \
           BOOST_PP_IS_EMPTY(error (/* expand empty */) ) \
- , BOOST_PP_LESS(index, BOOST_PP_SEQ_SIZE(sign)) \
+ , BOOST_PP_LESS(index, BOOST_PP_LIST_SIZE(sign)) \
     )
 
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS_PRED_(d, \
@@ -107,9 +107,9 @@
 
 // PUBLIC //
 
-// Validate parameter sequence's default values: `default ...` cannot be 1st
-// element and it must follow an unbind param.
-// Expand to `EMPTY` if no error, or `ERROR_message EMPTY` if error.
+// Validate parameters default values: `default ...` cannot be 1st element and
+// it must follow an unbind param. Expand to `EMPTY` if no error, or
+// `ERROR_message EMPTY` if error.
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS(sign) \
     BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE( \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_DEFAULTS_PRED_, \

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -9,7 +9,7 @@
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/list/fold_left.hpp>
 
 // PRIVATE //
 
@@ -35,7 +35,7 @@
 // PUBLIC //
 
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS(sign) \
- BOOST_PP_SEQ_FOLD_LEFT( \
+ BOOST_PP_LIST_FOLD_LEFT( \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_, \
             BOOST_PP_EMPTY, sign)
 

Modified: sandbox/closure/boost/closure/detail/preprocessor/line_counter.hpp
==============================================================================
--- sandbox/closure/boost/closure/detail/preprocessor/line_counter.hpp (original)
+++ sandbox/closure/boost/closure/detail/preprocessor/line_counter.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -6,7 +6,7 @@
 
 // PUBLIC //
 
-// MSVC has problems expanding __LINE__ so used (the non standard) __COUNTER__.
+// MSVC has problems expanding __LINE__ so use (the non standard) __COUNTER__.
 #ifdef BOOST_MSVC
 # define BOOST_CLOSURE_DETAIL_PP_LINE_COUNTER __COUNTER__
 #else

Modified: sandbox/closure/boost/functional/detail/overload_base.hpp
==============================================================================
--- sandbox/closure/boost/functional/detail/overload_base.hpp (original)
+++ sandbox/closure/boost/functional/detail/overload_base.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -5,34 +5,34 @@
 // copy at http://www.boost.org/LICENSE_1_0.txt).
 
 #if !BOOST_PP_IS_ITERATING
-# ifndef BOOST_LOCAL_AUX_OVERLOAD_BASE_HPP_
-# define BOOST_LOCAL_AUX_OVERLOAD_BASE_HPP_
+# ifndef BOOST_FUNCTIONAL_DETAIL_OVERLOAD_BASE_HPP_
+# define BOOST_FUNCTIONAL_DETAIL_OVERLOAD_BASE_HPP_
 
-# include "file.hpp"
-# include "../config.hpp"
+# include <boost/functional/config.hpp>
 # include <boost/function.hpp>
 # include <boost/preprocessor/iteration/iterate.hpp>
 # include <boost/preprocessor/repetition/enum.hpp>
 # include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/comma_if.hpp>
 
-#define BOOST_LOCAL_AUX_arg_type(z, n, unused) \
+#define BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
     BOOST_PP_CAT(A, n)
 
-#define BOOST_LOCAL_AUX_arg_name(z, n, unused) \
+#define BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused) \
     BOOST_PP_CAT(a, n)
 
-#define BOOST_LOCAL_AUX_arg_tparam(z, n, unused) \
- typename BOOST_LOCAL_AUX_arg_type(z, n, unused)
+#define BOOST_FUNCTIONAL_DETAIL_arg_tparam(z, n, unused) \
+ typename BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused)
 
-#define BOOST_LOCAL_AUX_arg(z, n, unused) \
- BOOST_LOCAL_AUX_arg_type(z, n, unused) \
- BOOST_LOCAL_AUX_arg_name(z, n, unused)
+#define BOOST_FUNCTIONAL_DETAIL_arg(z, n, unused) \
+ BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
+ BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused)
+
+#define BOOST_FUNCTIONAL_DETAIL_f \
+ R (BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity, \
+ BOOST_FUNCTIONAL_DETAIL_arg_type, ~))
 
-#define BOOST_LOCAL_AUX_f \
- R (BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity, BOOST_LOCAL_AUX_arg_type, ~))
-
-namespace boost { namespace local { namespace aux {
+namespace boost { namespace functional { namespace detail {
 
 template<typename F>
 class overload_base {
@@ -40,46 +40,47 @@
 };
 
 # define BOOST_PP_ITERATION_PARAMS_1 \
- (3, (0, BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX, \
- BOOST_LOCAL_AUX_FILE_OVERLOAD_BASE_HPP))
+ (3, (0, BOOST_FUNCTIONAL_CONFIG_ARITY_MAX, \
+ "boost/functional/detail/overload_base.hpp"))
 # include BOOST_PP_ITERATE() // Iterate over funciton arity.
 
-}}} // namespace boost::local::aux
+} } }
 
-#undef BOOST_LOCAL_AUX_arg_type
-#undef BOOST_LOCAL_AUX_arg_name
-#undef BOOST_LOCAL_AUX_arg_tparam
-#undef BOOST_LOCAL_AUX_arg
-#undef BOOST_LOCAL_AUX_f
+#undef BOOST_FUNCTIONAL_DETAIL_arg_type
+#undef BOOST_FUNCTIONAL_DETAIL_arg_name
+#undef BOOST_FUNCTIONAL_DETAIL_arg_tparam
+#undef BOOST_FUNCTIONAL_DETAIL_arg
+#undef BOOST_FUNCTIONAL_DETAIL_f
 
 # endif // #include guard
 
 #elif BOOST_PP_ITERATION_DEPTH() == 1
-# define BOOST_LOCAL_AUX_arity BOOST_PP_FRAME_ITERATION(1)
+# define BOOST_FUNCTIONAL_DETAIL_arity BOOST_PP_FRAME_ITERATION(1)
 
-// Iterating within namespace 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, ~)
+template<
+ typename R
+ BOOST_PP_COMMA_IF(BOOST_FUNCTIONAL_DETAIL_arity)
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
+ BOOST_FUNCTIONAL_DETAIL_arg_tparam, ~)
>
-class overload_base<BOOST_LOCAL_AUX_f> {
+class overload_base< BOOST_FUNCTIONAL_DETAIL_f > {
 public:
     /* implicit */ inline overload_base(
             // This requires specified type to be implicitly convertible to
             // a boost::function<> functor.
- ::boost::function<BOOST_LOCAL_AUX_f> const& f): f_(f)
+ boost::function< BOOST_FUNCTIONAL_DETAIL_f > const& f): f_(f)
     {}
 
- inline R operator()(BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity,
- BOOST_LOCAL_AUX_arg, ~)) const {
- return f_(BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity,
- BOOST_LOCAL_AUX_arg_name, ~));
+ inline R operator()(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
+ BOOST_FUNCTIONAL_DETAIL_arg, ~)) const {
+ return f_(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
+ BOOST_FUNCTIONAL_DETAIL_arg_name, ~));
     }
 
 private:
- ::boost::function<BOOST_LOCAL_AUX_f> const f_;
+ boost::function< BOOST_FUNCTIONAL_DETAIL_f > const f_;
 };
 
-# undef BOOST_LOCAL_AUx_arity
+# undef BOOST_FUNCTIONAL_DETAIL_arity
 #endif // iteration
 

Modified: sandbox/closure/boost/functional/overload.hpp
==============================================================================
--- sandbox/closure/boost/functional/overload.hpp (original)
+++ sandbox/closure/boost/functional/overload.hpp 2012-01-17 10:16:57 EST (Tue, 17 Jan 2012)
@@ -7,12 +7,12 @@
 #ifndef DOXY // Doxygen documentation only.
 
 #if !BOOST_PP_IS_ITERATING
-# ifndef BOOST_LOCAL_FUNCTION_OVERLOAD_HPP_
-# define BOOST_LOCAL_FUNCTION_OVERLOAD_HPP_
+# ifndef BOOST_FUNCTIONAL_OVERLOAD_HPP_
+# define BOOST_FUNCTIONAL_OVERLOAD_HPP_
 
-# include "../config.hpp"
-# include "../aux_/file.hpp"
-# include "../aux_/overload_base.hpp"
+# include <boost/functional/detail/overload_base.hpp>
+# include <boost/functional/detail/function_type.hpp>
+# include <boost/functional/config.hpp>
 # include <boost/preprocessor/iteration/iterate.hpp>
 # include <boost/preprocessor/repetition/enum.hpp>
 # include <boost/preprocessor/repetition/repeat.hpp>
@@ -27,114 +27,144 @@
 # include <boost/preprocessor/logical/not.hpp>
 # include <boost/preprocessor/facilities/expand.hpp>
 
-#define BOOST_LOCAL_f_type(z, f, unused) \
- BOOST_PP_CAT(F, f)
+#define BOOST_FUNCTIONAL_f_type(z, n, unused) \
+ BOOST_PP_CAT(F, n)
 
-#define BOOST_LOCAL_f_tparam(z, f, unused) \
- typename BOOST_LOCAL_f_type(z, f, unused) \
+#define BOOST_FUNCTIONAL_f_arg(z, n, unused) \
+ BOOST_PP_CAT(f, n)
 
-#define BOOST_LOCAL_f_tparam_dflt(z, f, is_tspec) \
- BOOST_LOCAL_f_tparam(z, f, unused) \
+#define BOOST_FUNCTIONAL_f_tparam(z, n, unused) \
+ typename BOOST_FUNCTIONAL_f_type(z, n, ~) \
+
+#define BOOST_FUNCTIONAL_f_tparam_dflt(z, n, is_tspec) \
+ BOOST_FUNCTIONAL_f_tparam(z, n, ~) \
     /* overload requires at least 2 functors so F0 and F1 not optional */ \
     BOOST_PP_EXPR_IIF(BOOST_PP_AND(BOOST_PP_NOT(is_tspec), \
- BOOST_PP_GREATER(f, 1)), \
+ BOOST_PP_GREATER(n, 1)), \
         = void \
     )
 
-#define BOOST_LOCAL_g_arg_type(z, f, unused) \
- BOOST_PP_CAT(G, f)
+#define BOOST_FUNCTIONAL_f_arg_decl(z, n, unused) \
+ BOOST_FUNCTIONAL_f_type(z, n, ~) /* no qualifier to deduce tparam */ \
+ BOOST_FUNCTIONAL_f_arg(z, n, ~)
+
+#define BOOST_FUNCTIONAL_g_type(z, n, unused) \
+ BOOST_PP_CAT(G, n)
 
-#define BOOST_LOCAL_g_arg_name(z, f, unused) \
- BOOST_PP_CAT(g, f)
+#define BOOST_FUNCTIONAL_g_arg(z, n, unused) \
+ BOOST_PP_CAT(g, n)
 
-#define BOOST_LOCAL_g_arg_tparam(z, f, unused) \
- typename BOOST_LOCAL_g_arg_type(z, f, unused)
+#define BOOST_FUNCTIONAL_g_tparam(z, n, unused) \
+ typename BOOST_FUNCTIONAL_g_type(z, n, ~)
 
-#define BOOST_LOCAL_g_arg(z, f, unused) \
- /* unfortunately, cannot add const and/or & (not even using */ \
- /* Boost.TypeTraits or Boost.CallTraits) to this function argument */ \
- /* type which needs to remain generic as in its template declaration */ \
- /* (otherwise MSVC cannot deduce the types */ \
- BOOST_LOCAL_g_arg_type(z, f, unused) \
- BOOST_LOCAL_g_arg_name(z, f, unsed)
+#define BOOST_FUNCTIONAL_g_arg_decl(z, n, unused) \
+ BOOST_FUNCTIONAL_g_type(z, n, ~) /* no qualifier to deduce tparam */ \
+ BOOST_FUNCTIONAL_g_arg(z, n, ~)
 
-#define BOOST_LOCAL_overload_base(z, f, unused) \
- ::boost::local::aux::overload_base<BOOST_LOCAL_f_type(z, f, unused)>
+#define BOOST_FUNCTIONAL_overload_base(z, n, unused) \
+ ::boost::functional::detail::overload_base< \
+ BOOST_FUNCTIONAL_f_type(z, n, ~) \
+ >
 
-#define BOOST_LOCAL_overload_inherit(z, f, unused) \
- public BOOST_LOCAL_overload_base(z, f, unused)
+#define BOOST_FUNCTIONAL_overload_inherit(z, n, unused) \
+ public BOOST_FUNCTIONAL_overload_base(z, n, ~)
 
-#define BOOST_LOCAL_overload_base_init(z, f, unused) \
- BOOST_LOCAL_overload_base(z, f, unused)( /* base init paren `()` */ \
- BOOST_LOCAL_g_arg_name(z, f, unused))
+#define BOOST_FUNCTIONAL_overload_base_init(z, n, unused) \
+ BOOST_FUNCTIONAL_overload_base(z, n, ~)( /* base init paren `()` */ \
+ BOOST_FUNCTIONAL_g_arg(z, n, ~))
 
-#define BOOST_LOCAL_using_operator_call(z, f, unused) \
- using BOOST_LOCAL_overload_base(z, f, unused)::operator();
+#define BOOST_FUNCTIONAL_using_operator_call(z, n, unused) \
+ using BOOST_FUNCTIONAL_overload_base(z, n, ~)::operator();
 
-namespace boost { namespace local { namespace function {
+#define BOOST_FUNCTIONAL_function_type(z, n, unused) \
+ typename detail::function_type< BOOST_FUNCTIONAL_f_type(z, n, ~) >::type
+
+namespace boost { namespace functional {
 
 // Iterate within namespace.
 # define BOOST_PP_ITERATION_PARAMS_1 \
                 /* need at least 2 functors to overload so iter 2, 3, ... */ \
- (3, (0, BOOST_PP_SUB(BOOST_LOCAL_CONFIG_OVERLOAD_MAX, 2), \
- BOOST_LOCAL_AUX_FILE_FUNCTION_OVERLOAD_HPP))
+ (3, (0, BOOST_PP_SUB(BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX, 2), \
+ "boost/functional/overload.hpp"))
 # include BOOST_PP_ITERATE() // Iterate over function arity.
 
-}}} // namespace boost::local::function
+} }
 
-#undef BOOST_LOCAL_f_type
-#undef BOOST_LOCAL_f_tparam
-#undef BOOST_LOCAL_f_tparam_dflt
-#undef BOOST_LOCAL_g_arg_type
-#undef BOOST_LOCAL_g_arg_name
-#undef BOOST_LOCAL_g_arg_tparam
-#undef BOOST_LOCAL_g_arg
-#undef BOOST_LOCAL_overload_base
-#undef BOOST_LOCAL_overload_inherit
-#undef BOOST_LOCAL_overload_base_init
-#undef BOOST_LOCAL_using_operator_call
+#undef BOOST_FUNCTIONAL_f_type
+#undef BOOST_FUNCTIONAL_f_arg
+#undef BOOST_FUNCTIONAL_f_tparam
+#undef BOOST_FUNCTIONAL_f_arg_decl
+#undef BOOST_FUNCTIONAL_f_tparam_dflt
+#undef BOOST_FUNCTIONAL_g_type
+#undef BOOST_FUNCTIONAL_g_arg
+#undef BOOST_FUNCTIONAL_g_tparam
+#undef BOOST_FUNCTIONAL_g_arg_decl
+#undef BOOST_FUNCTIONAL_overload_base
+#undef BOOST_FUNCTIONAL_overload_inherit
+#undef BOOST_FUNCTIONAL_overload_base_init
+#undef BOOST_FUNCTIONAL_using_operator_call
+#undef BOOST_FUNCTIONAL_function_type
 
 # endif // #include guard
 
 #elif BOOST_PP_ITERATION_DEPTH() == 1
-# define BOOST_LOCAL_overloads \
+# define BOOST_FUNCTIONAL_overloads \
         /* iterate as OVERLOADS, OVERLOADS-1, OVERLOADS-2, ... */ \
- BOOST_PP_SUB(BOOST_LOCAL_CONFIG_OVERLOAD_MAX, \
+ BOOST_PP_SUB(BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX, \
                 BOOST_PP_FRAME_ITERATION(1))
-# define BOOST_LOCAL_is_tspec \
+# define BOOST_FUNCTIONAL_is_tspec \
         /* if template specialization */ \
- BOOST_PP_LESS(BOOST_LOCAL_overloads, BOOST_LOCAL_CONFIG_OVERLOAD_MAX)
+ BOOST_PP_LESS(BOOST_FUNCTIONAL_overloads, \
+ BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX)
 
-// Iterating within namespace boost::local::function.
-template<BOOST_PP_ENUM(BOOST_LOCAL_overloads, BOOST_LOCAL_f_tparam_dflt,
- BOOST_LOCAL_is_tspec)>
+template<
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_tparam_dflt,
+ BOOST_FUNCTIONAL_is_tspec)
+>
 class overload
     // Template specialization.
- BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_LOCAL_is_tspec), <)
- BOOST_PP_IIF(BOOST_LOCAL_is_tspec,
+ BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_FUNCTIONAL_is_tspec), <)
+ BOOST_PP_IIF(BOOST_FUNCTIONAL_is_tspec,
         BOOST_PP_ENUM
     ,
         BOOST_PP_TUPLE_EAT(3)
- )(BOOST_LOCAL_overloads, BOOST_LOCAL_f_type, ~)
- BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_LOCAL_is_tspec), >)
- // Bases.
- : // Overloads >= 2 so always at least 2 bases.
- BOOST_PP_ENUM(BOOST_LOCAL_overloads, BOOST_LOCAL_overload_inherit, ~)
+ )(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_type, ~)
+ BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_FUNCTIONAL_is_tspec), >)
+ // Bases (overloads >= 2 so always at least 2 bases).
+ : BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
+ BOOST_FUNCTIONAL_overload_inherit, ~)
 {
 public:
- template<BOOST_PP_ENUM(BOOST_LOCAL_overloads, BOOST_LOCAL_g_arg_tparam, ~)>
- /* implicit */ inline overload(
- BOOST_PP_ENUM(BOOST_LOCAL_overloads, BOOST_LOCAL_g_arg, ~))
- : // Overloads >= 2 so always at least 2 bases to initialize.
- BOOST_PP_ENUM(BOOST_LOCAL_overloads,
- BOOST_LOCAL_overload_base_init, ~)
+ template<
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_g_tparam, ~)
+ > /* implicit */ inline overload(
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
+ BOOST_FUNCTIONAL_g_arg_decl, ~))
+ // Overloads >= 2 so always at least 2 bases to initialize.
+ : BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
+ BOOST_FUNCTIONAL_overload_base_init, ~)
     {}
 
- BOOST_PP_REPEAT(BOOST_LOCAL_overloads, BOOST_LOCAL_using_operator_call, ~)
+ BOOST_PP_REPEAT(BOOST_FUNCTIONAL_overloads,
+ BOOST_FUNCTIONAL_using_operator_call, ~)
 };
 
-# undef BOOST_LOCAL_AUX_overloads
-# undef BOOST_LOCAL_is_tspec
+template<
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_tparam, ~)
+>
+overload<
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_function_type, ~)
+> make_overload(
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_arg_decl, ~)
+) {
+ return overload<
+ BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
+ BOOST_FUNCTIONAL_function_type, ~)
+ >(BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_arg, ~));
+}
+
+# undef BOOST_FUNCTIONAL_overloads
+# undef BOOST_FUNCTIONAL_is_tspec
 #endif // iteration
 
 #else // DOXY: Doxygen documentation only.
@@ -144,7 +174,7 @@
  * a set of specified functors.
  */
 
-namespace boost { namespace local { namespace function {
+namespace boost { namespace funcational {
 
 /**
  * @brief Functor to overload local functions and other functors.
@@ -158,14 +188,14 @@
  * @endcode
  *
  * The maximum number of overloaded function types is specified by the
- * @RefMacro{BOOST_LOCAL_CONFIG_OVERLOAD_MAX} configuration macro.
+ * @RefMacro{BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX} configuration macro.
  * The maximum number of function parameters for each of the specified function
- * type is specified by the @RefMacro{BOOST_LOCAL_CONFIG_OVERLOAD_MAX}
+ * type is specified by the @RefMacro{BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX}
  * configuration macro.
  *
  * @See @RefSect2{Advanced_Topics, Advanced Topics} section,
- * @RefMacro{BOOST_LOCAL_CONFIG_OVERLOAD_MAX},
- * @RefMacro{BOOST_LOCAL_CONFIG_OVERLOAD_MAX}, Boost.Function.
+ * @RefMacro{BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX},
+ * @RefMacro{BOOST_FUNCTIONAL_CONFIG_OVERLOAD_MAX}, Boost.Function.
  */
 template<typename F1, typename F2, ...>
 class overload {
@@ -204,7 +234,7 @@
             ...) const;
 };
 
-}}} // namespace boost::local::function
+} }
 
 #endif // DOXY
 


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