Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76030 - in sandbox/closure/boost: . closure/aux_/preprocessor/traits closure/aux_/preprocessor/traits/decl_ closure/aux_/preprocessor/traits/decl_/validate_ closure/detail/preprocessor/keyword
From: lorcaminiti_at_[hidden]
Date: 2011-12-17 15:19:52


Author: lcaminiti
Date: 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
New Revision: 76030
URL: http://svn.boost.org/trac/boost/changeset/76030

Log:
Simplified pp-traits APIs (removed some LIST_IS_CONS and IS_EMPTY queries).
Added:
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp
      - copied, changed from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp
      - copied, changed from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_params.hpp
      - copied, changed from r76020, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_returns.hpp
      - copied, changed from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp
Removed:
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_any_bind.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp
Text files modified:
   sandbox/closure/boost/closure.hpp | 46 ++++++++++++++++++++--------------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/bind.hpp | 30 ++++++++-----------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl.hpp | 9 ++++---
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/append.hpp | 15 +++++++-----
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp | 8 +++---
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/return_count.hpp | 16 ++-----------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/this_count.hpp | 31 ++++++++++----------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp | 32 +++++++++------------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp | 34 +++++++++--------------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_error.hpp | 7 ------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_params.hpp | 43 ++----------------------------------
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_returns.hpp | 5 ++-
   sandbox/closure/boost/closure/detail/preprocessor/keyword/bind.hpp | 12 +++++-----
   sandbox/closure/boost/closure/detail/preprocessor/keyword/const.hpp | 6 ++--
   14 files changed, 103 insertions(+), 191 deletions(-)

Modified: sandbox/closure/boost/closure.hpp
==============================================================================
--- sandbox/closure/boost/closure.hpp (original)
+++ sandbox/closure/boost/closure.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -9,24 +9,24 @@
  * where they are needed.
  */
 
-#ifndef BOOST_LOCAL_FUNCTION_HPP_
-#define BOOST_LOCAL_FUNCTION_HPP_
+#ifndef BOOST_CLOSURE_HPP_
+#define BOOST_CLOSURE_HPP_
 
-#include "config.hpp"
+#include <boost/closure/config.hpp>
 #include <boost/closure/aux_/symbol.hpp>
-#include "aux_/function_macros/params.hpp"
-#include "aux_/function_macros/name.hpp"
+#include <boost/closure/aux_/macro/closure.hpp>
+#include <boost/closure/aux_/macro/closure_end.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/config.hpp> // For variadic macros.
 
 // 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) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
+#if defined(BOOST_NO_VARIADIC_MACROS)
 
 /** @cond */
-#define BOOST_LOCAL_FUNCTION_PARAMS_(id, is_template, parameters) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(parameters, id, is_template)
+#define BOOST_CLOSURE_(id, is_template, decl_seq) \
+ BOOST_CLOSURE_AUX_CLOSURE(decl_seq, id, is_template)
 /** @endcond */
 
 /**
@@ -143,8 +143,8 @@
  * @RefMacro{BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX},
  * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}, Boost.Function.
  */
-#define BOOST_LOCAL_FUNCTION_PARAMS(parameters) \
- BOOST_LOCAL_FUNCTION_PARAMS_(__LINE__, 0 /* no template */, parameters)
+#define BOOST_CLOSURE(declarations) \
+ BOOST_CLOSURE_(__LINE__, 0 /* no template */, declarations)
 
 /**
  * @brief This macro is the same as @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS} but
@@ -152,23 +152,23 @@
  *
  * @See @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS}, @RefSect{Tutorial} section.
  */
-#define BOOST_LOCAL_FUNCTION_PARAMS_TPL(parameters) \
- BOOST_LOCAL_FUNCTION_PARAMS_(__LINE__, 1 /* template */, parameters)
+#define BOOST_CLOSURE_TPL(declarations) \
+ BOOST_CLOSURE_(__LINE__, 1 /* template */, declarations)
 
 #else // BOOST_NO_VARIADIC_MACROS
 
-#include "aux_/preprocessor/variadic/to_seq.hpp"
+#include <boost/closure/aux_/preprocessor/variadic/to_seq.hpp>
 
-#define BOOST_LOCAL_FUNCTION_PARAMS_(id, is_template, ...) \
- BOOST_LOCAL_AUX_FUNCTION_PARAMS(BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ( \
+#define BOOST_CLOSURE_(id, is_template, ...) \
+ BOOST_CLOSURES_AUX_CLOSURE(BOOST_CLOSURE_AUX_PP_VARIADIC_TO_SEQ( \
             (void) /* for empty seq */, __VA_ARGS__), \
             id, is_template)
 
-#define BOOST_LOCAL_FUNCTION_PARAMS(...) \
- BOOST_LOCAL_FUNCTION_PARAMS_(__LINE__, 0 /* no template */, __VA_ARGS__)
+#define BOOST_CLOSURE(...) \
+ BOOST_CLOSURE_(__LINE__, 0 /* no template */, __VA_ARGS__)
 
-#define BOOST_LOCAL_FUNCTION_PARAMS_TPL(...) \
- BOOST_LOCAL_FUNCTION_PARAMS_(__LINE__, 1 /* template */, __VA_ARGS__)
+#define BOOST_CLOSURE_TPL(...) \
+ BOOST_CLOSURE_(__LINE__, 1 /* template */, __VA_ARGS__)
 
 #endif // BOOST_NO_VARIADIC_MACROS
 
@@ -226,8 +226,8 @@
  * @RefSect2{Advanced_Topics, Advanced Topics} section,
  * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}.
  */
-#define BOOST_LOCAL_FUNCTION_NAME(name) \
- BOOST_LOCAL_AUX_FUNCTION_NAME(name)
+#define BOOST_CLOSURE_END(name) \
+ BOOST_CLOSURE_AUX_CLOSURE_END(name)
 
 /** @todo make this accept this_ and error on this */
 // Bound variable name. Expand to qualified bound type (i.e., bound variable
@@ -265,8 +265,8 @@
  * @RefMacro{BOOST_LOCAL_EXIT}, @RefSect2{Advanced_Topics, Advanced Topics}
  * section.
  */
-#define BOOST_LOCAL_TYPEOF(bound_variable_name) \
- BOOST_LOCAL_AUX_SYMBOL_TYPEOF_TYPE(bound_variable_name)
+#define BOOST_CLOSURE_TYPEOF(bound_variable_name) \
+ BOOST_CLOSURE_AUX_SYMBOL_TYPEOF_TYPE(bound_variable_name)
 
 #endif // #include guard
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/bind.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/bind.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -8,8 +8,6 @@
 #define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_HPP_
 
 #include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/logical/compl.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
 
 // PRIVATE //
 
@@ -18,36 +16,28 @@
 #define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_WITH_TYPE_ 1
 #define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_MAX_ 2
 
-// PUBLIC //
+// This bind is 1-typle `([type_] EMPTY)`.
+#define BOOST_CLOSURE_AUX_PP_BIND_THIS_TRAITS_INDEX_TYPE_ 0
+#define BOOST_CLOSURE_AUX_PP_BIND_THIS_TRAITS_INDEX_MAX_ 1
 
-// Bind variable (const or not).
+// PUBLIC //
 
 // Expand: `[&] var_`.
 #define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE(bind_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_MAX_, \
             BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_WITHOUT_TYPE_, bind_traits)
 
-// Expand: `[(type_) [&] var_]` (EMPTY if no type_ specified).
+// Expand: `[type_ [&] var_]` (EMPTY if no type_ specified).
 #define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_WITH_TYPE(bind_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_MAX_, \
             BOOST_CLOSURE_AUX_PP_BIND_TRAITS_INDEX_WITH_TYPE_, bind_traits) \
             (/* expand EMPTY */)
 
-// Expand: 1 iff type_ specified, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_VAR_HAS_TYPE(bind_traits) \
- BOOST_PP_COMPL(BOOST_PP_IS_EMPTY( \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_WITH_TYPE(bind_traits)))
-
-// Bind object this (const or not).
-
-// Expand: `[(type_)]` (EMPTY if no type_ specified).
-#define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_THIS_TYPE(bind_this_type) \
- BOOST_PP_TUPLE_ELEM(1, 0, bind_this_type)(/* expand EMPTY */)
-
-// Expand: 1 iff type_ specified, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_THIS_HAS_TYPE(bind_this_type) \
- BOOST_PP_COMPL(BOOST_PP_IS_EMPTY( \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_THIS_TYPE(bind_this_type)))
+// Expand: `[type_]` (EMPTY if no type_ specified).
+#define BOOST_CLOSURE_AUX_PP_BIND_TRAITS_THIS_TYPE(bind_this_traits) \
+ BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_BIND_THIS_TRAITS_INDEX_MAX_, \
+ BOOST_CLOSURE_AUX_PP_BIND_THIS_TRAITS_INDEX_TYPE_, \
+ bind_this_traits)(/* expand EMPTY */)
 
 #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 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -15,10 +15,11 @@
 
 // PUBLIC //
 
-// declaration_seq can be empty ``, or `void`, or `(void)` for no params.
-// Or, `{([auto | register] param_type param_name)[(default default_value)]
-// | ([const] bind [&] bind_name)}+ [(return result_type)]` where `bind_name`
-// can be `this_` (but not `&this_` as usual in C++).
+// 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), \

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/append.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/append.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/append.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -7,12 +7,15 @@
 #ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_APPEND_HPP_
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_APPEND_HPP_
 
-#include <boost/closure/aux_/preprocessor/traits/decl_return.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_param.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_returns.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_params.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_binds.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_error.hpp>
+#include <boost/closure/aux_/preprocessor/traits/param.hpp>
 #include <boost/closure/detail/preprocessor/keyword/return.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
 #include <boost/preprocessor/list/append.hpp>
 #include <boost/preprocessor/list/size.hpp>
 #include <boost/preprocessor/list/at.hpp>
@@ -29,7 +32,7 @@
     , \
         ( /* list 2-tuple */ \
             ( /* (param_decl, default) 2-tuple */ \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DECL( \
+ BOOST_CLOSURE_AUX_PP_PARAM_TRAITS_DECL( \
                         BOOST_PP_LIST_AT(params, BOOST_PP_DEC( \
                                 BOOST_PP_LIST_SIZE(params)))) \
             , \
@@ -185,7 +188,7 @@
     , /* const-bind `this` types */ \
         BOOST_PP_LIST_APPEND( \
                 BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
- decl_trait), \
+ decl_traits), \
                 ( (this_type), BOOST_PP_NIL ) ) \
     , /* bind vars */ \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits) \

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -7,10 +7,10 @@
 #ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SET_ERROR_HPP_
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SET_ERROR_HPP_
 
-#include <boost/closure/aux_/preprocessor/traits/decl_return.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_param.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_returns.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_params.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_binds.hpp>
 
 // PUBLIC //
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/return_count.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/return_count.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/return_count.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -8,8 +8,7 @@
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_RETURN_COUNT_HPP_
 
 #include <boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_error.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_return.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_returns.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
@@ -18,23 +17,14 @@
 
 // PRIVATE //
 
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_RETURN_COUNT_(decl_traits) \
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_RETURN_COUNT(decl_traits) \
     BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_LIST_SIZE( \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS(decl_traits)), 1), \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SET_ERROR \
- , \
+ , /* else do nothing (keeping previous error, if any) */ \
         decl_traits BOOST_PP_TUPLE_EAT(2) \
     )(decl_traits, /* trailing `EMPTY` because error might not be present */ \
             ERROR_cannot_specify_more_than_one_return_type BOOST_PP_EMPTY)
 
-// PUBLIC //
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_RETURN_COUNT(decl_traits) \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ERROR(decl_traits), \
- decl_traits BOOST_PP_TUPLE_EAT(1) /* fwd existing error */ \
- , \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_RETURN_COUNT_ \
- )(decl_traits)
-
 #endif // #include guard
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/this_count.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/this_count.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_/validate_/this_count.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -8,35 +8,28 @@
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_HPP_
 
 #include <boost/closure/aux_/preprocessor/traits/decl_/set_error.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_error.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_bind.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp>
+#include <boost/closure/aux_/preprocessor/traits/decl_binds.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/logical/bitand.hpp>
+#include <boost/preprocessor/comparison/greater.hpp>
+#include <boost/preprocessor/list/append.hpp>
+#include <boost/preprocessor/list/size.hpp>
 
-// PRIVATE //
+// PUBLIC //
 
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_(decl_traits) \
- BOOST_PP_IIF(BOOST_PP_BITAND( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND_THIS( \
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT(decl_traits) \
+ BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_LIST_SIZE(BOOST_PP_LIST_APPEND( \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
                     decl_traits), \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND_THIS(decl_traits)), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES(decl_traits))), \
+ 1), \
         BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SET_ERROR \
- , \
+ , /* do nothing (keeping previous error, if any) */ \
         decl_traits BOOST_PP_TUPLE_EAT(2) \
     )(decl_traits, /* trailing `EMPTY` because error might not be present */ \
             ERROR_cannot_bind_object_this_multiple_times BOOST_PP_EMPTY)
 
-// PUBLIC //
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT(decl_traits) \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ERROR(decl_traits), \
- decl_traits BOOST_PP_TUPLE_EAT(1) /* fwd existing error */ \
- , \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_ \
- )(decl_traits)
-
 #endif // #include guard
 

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_any_bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_any_bind.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
+++ (empty file)
@@ -1,76 +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_CLOSURE_AUX_PP_DECL_TRAITS_ANY_BIND_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ANY_BIND_HPP_
-
-#include <boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_bind.hpp>
-#include <boost/preprocessor/logical/bitor.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/list/append.hpp>
-
-// PUBLIC //
-
-// Expand: 1 iff `this` is bound (const or not).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ANY_BIND_THIS(decl_traits) \
- /* can't use PP_BITOR/PP_OR because don't expand on MSVC */ \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND_THIS( \
- decl_traits), \
- 1 \
- , BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND_THIS( \
- decl_traits), \
- 1 \
- , \
- 0 \
- ))
-
-// Expand: 1 iff has one or more bound including `this` (const or not).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ANY_BIND(decl_traits) \
- /* can't use PP_BITOR/PP_OR because don't expand on MSVC */ \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND( \
- decl_traits), \
- 1 \
- , BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND_THIS( \
- decl_traits), \
- 1 \
- , BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND(decl_traits), \
- 1 \
- , BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND_THIS( \
- decl_traits), \
- 1 \
- , \
- 0 \
- ))))
-
-// Expand: pp-list with all binds (const or not) but excluding `this`.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ALL_BINDS_WITHOUT_THIS(decl_traits) \
- BOOST_PP_LIST_APPEND(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND( \
- decl_traits), BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list with all binds (const or not) and including `this` if bound
-// (const or not).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ALL_BINDS(decl_traits) \
- BOOST_PP_LIST_APPEND(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ALL_BIND( \
- decl_traits), \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ANY_BIND_THIS( \
- decl_traits), \
- (this, BOOST_PP_NIL) /* `this` never by ref because in C++ */ \
- , \
- BOOST_PP_NIL \
- ) \
- )
-
-// Expand: pp-list of all `this` types (const or not). There is at most 1 bind
-// `this` type if no parsing error.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ALL_BIND_THIS_TYPES(decl_traits) \
- BOOST_PP_LIST_APPEND( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPE(decl_traits), \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPE(decl_traits))
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
+++ (empty file)
@@ -1,55 +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_CLOSURE_AUX_PP_DECL_TRAITS_BIND_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_HPP_
-
-#include <boost/closure/aux_/preprocessor/traits/decl_any_bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
-#include <boost/preprocessor/list/transform.hpp>
-
-// PRIVATE //
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_TYPED_(d, macro, elem) \
- macro(elem)
-
-// PUBLIC //
-
-// Expand: pp-list of non-const binds.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_BINDS, decl_traits)
-
-// Expand: 1 iff at least 1 non-const bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list of non-const binds 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_TYPED_, \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_WITHOUT_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list of non-const binds 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_TYPED_, \
- BOOST_CLOSURE_AUX_PP_BIND_TRAITS_WITH_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list of types for bound this (size <= 1 only 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, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_BIND_THIS_TYPES, decl_traits)
-
-// Expand: 1 iff this was bound, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND_THIS(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
- decl_traits))
-
-#endif // #include guard
-

Copied: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp (from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp)
==============================================================================
--- /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_bind.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_binds.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -4,52 +4,42 @@
 // 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_CLOSURE_AUX_PP_DECL_TRAITS_BIND_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS_HPP_
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS_HPP_
 
-#include <boost/closure/aux_/preprocessor/traits/decl_any_bind.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
 #include <boost/preprocessor/list/transform.hpp>
 
 // PRIVATE //
 
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_TYPED_(d, macro, elem) \
- macro(elem)
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_APPLY_( \
+ d, bind_macro, bind_traits) \
+ bind_macro(bind_traits)
 
 // PUBLIC //
 
-// Expand: pp-list of non-const binds.
+// Expand: pp-list of non-const bind-traits.
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BINDS(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_BINDS, decl_traits)
 
-// Expand: 1 iff at least 1 non-const bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND(decl_traits))
-
-// Expand: pp-list of non-const binds without explicit types.
+// 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_TYPED_, \
+ 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 binds with explicit types.
+// 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_TYPED_, \
+ 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 of types for bound this (size <= 1 only after validation).
+// 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, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_BIND_THIS_TYPES, decl_traits)
 
-// Expand: 1 iff this was bound, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_BIND_THIS(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
- decl_traits))
-
 #endif // #include guard
 

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
+++ (empty file)
@@ -1,60 +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_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_HPP_
-
-#include <boost/closure/aux_/preprocessor/traits/bind.hpp>
-#include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
-#include <boost/preprocessor/list/transform.hpp>
-
-// PRIVATE //
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_TYPED_(d, macro, elem) \
- macro(elem)
-
-// PUBLIC //
-
-// Expand: pp-list of const-binds.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_CONST_BINDS, decl_traits)
-
-// Expand: 1 iff at least 1 const-bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND( \
- decl_traits))
-
-// Expand: pp-list of const-binds 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_TRAUTS_CONST_BIND_TYPED_, \
- 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-binds 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_TYPED_, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ANY_BIND_WITH_TYPE, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND(decl_traits))
-
-// Expand: pp-list of type for const-bind of this (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, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_CONST_BIND_THIS_TYPES, \
- decl_traits)
-
-// Expand: 1 iff this is const-bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND_THIS(decl_traits) \
- BOOST_PP_LIST_IS_CONS( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES(decl_traits))
-
-#endif // #include guard
-

Copied: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp (from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp)
==============================================================================
--- /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_bind.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_const_binds.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -4,57 +4,45 @@
 // 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_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS_HPP_
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS_HPP_
 
 #include <boost/closure/aux_/preprocessor/traits/bind.hpp>
 #include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
 #include <boost/preprocessor/list/transform.hpp>
 
 // PRIVATE //
 
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_TYPED_(d, macro, elem) \
- macro(elem)
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_APPLY_( \
+ d, bind_macro, bind_traits) \
+ bind_macro(bind_traits)
 
 // PUBLIC //
 
-// Expand: pp-list of const-binds.
+// Expand: pp-list of const bind-traits.
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_CONST_BINDS, decl_traits)
 
-// Expand: 1 iff at least 1 const-bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND( \
- decl_traits))
-
-// Expand: pp-list of const-binds without explicit type.
+// 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_TRAUTS_CONST_BIND_TYPED_, \
+ 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-binds with explicit type.
+// 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_TYPED_, \
+ 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 type for const-bind of this (size <= 1 after validation).
+// 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, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_CONST_BIND_THIS_TYPES, \
             decl_traits)
 
-// Expand: 1 iff this is const-bind, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_CONST_BIND_THIS(decl_traits) \
- BOOST_PP_LIST_IS_CONS( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES(decl_traits))
-
 #endif // #include guard
 

Modified: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_error.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_error.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_error.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -9,8 +9,6 @@
 
 #include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/logical/compl.hpp>
 
 // PUBLIC //
 
@@ -23,10 +21,5 @@
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits) \
     BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR(decl_traits)(/* expand EMPTY */)
 
-// Expand: 1 iff pp-parsing error, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_ERROR(decl_traits) \
- BOOST_PP_COMPL(BOOST_PP_IS_EMPTY( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_ERROR_MSG(decl_traits)))
-
 #endif // #include guard
 

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
+++ (empty file)
@@ -1,90 +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_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HPP_
-
-#include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
-#include <boost/closure/detail/preprocessor/keyword/default.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/logical/compl.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
-#include <boost/preprocessor/list/fold_left.hpp>
-
-// PRIVATE //
-
-// Param 2-tuple `([auto | register] type name, default_value)`.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DECL_ 0
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DEFAULT_ 1
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_ 2
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_COUNT_DEFAULTS_OP_(s, \
- default_count, param) \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HAS_DEFAULT( \
- param), \
- BOOST_PP_INC \
- , \
- default_count BOOST_PP_TUPLE_EAT(1) \
- )(default_count)
-
-// Precondition: unbinds is a pp-list which is not nil.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_COUNT_DEFAULTS_(params) \
- BOOST_PP_LIST_FOLD_LEFT( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_COUNT_DEFAULTS_OP_, \
- 0 /* start with defaults_count to 0 */, params)
-
-// Expand to `default ... EMPTY()` if default value, `EMPTY()` otherwise.
-// Leading default is kept because default value might not be alphanumeric
-// (so failing `CAT` for `IS_EMPTY` check).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DEFAULT_, param) \
- (/* expand EMPTY */)
-
-// PUBLIC //
-
-// Single parameter.
-
-// Expand: `[auto | register] type_ name_` (parameter declaration).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DECL(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DECL_, param)
-
-// Expand: `[default_value_]`, EMPTY if no parameter default value.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT(param) \
- BOOST_CLOSURE_DETAIL_PP_KEYWORD_DEFAULT_REMOVE_FRONT( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param))
-
-// Expand: 1 iff parameter has default value, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HAS_DEFAULT(param) \
- BOOST_PP_COMPL(BOOST_PP_IS_EMPTY( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param)))
-
-// All parameters.
-
-// Expand: pp-list of parameters (bound variables excluded).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_PARAMS, decl_traits)
-
-// Expand: 1 iff at least 1 parameter (bound variables excluded).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_PARAM(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits))
-
-// Expand: number of parameters with default values (0 if no default).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_COUNT_DEFAULT_PARAMS(decl_traits) \
- BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_PARAMS(decl_traits), \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_COUNT_DEFAULTS_ \
- , \
- 0 BOOST_PP_TUPLE_EAT(1) \
- )(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits))
-
-#endif // #include guard
-

Copied: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_params.hpp (from r76020, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp)
==============================================================================
--- /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_param.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_params.hpp 2011-12-17 15:19:50 EST (Sat, 17 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_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_HPP_
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_HPP_
 
 #include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
 #include <boost/closure/detail/preprocessor/keyword/default.hpp>
@@ -15,16 +15,10 @@
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/logical/compl.hpp>
 #include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/list/adt.hpp> // For `IS_CONS`.
 #include <boost/preprocessor/list/fold_left.hpp>
 
 // PRIVATE //
 
-// Param 2-tuple `([auto | register] type name, default_value)`.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DECL_ 0
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DEFAULT_ 1
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_ 2
-
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS_COUNT_DEFAULTS_OP_(s, \
         default_count, param) \
     BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HAS_DEFAULT( \
@@ -40,44 +34,13 @@
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_COUNT_DEFAULTS_OP_, \
             0 /* start with defaults_count to 0 */, params)
 
-// Expand to `default ... EMPTY()` if default value, `EMPTY()` otherwise.
-// Leading default is kept because default value might not be alphanumeric
-// (so failing `CAT` for `IS_EMPTY` check).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DEFAULT_, param) \
- (/* expand EMPTY */)
-
 // PUBLIC //
 
-// Single parameter.
-
-// Expand: `[auto | register] type_ name_` (parameter declaration).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DECL(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_MAX_, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_INDEX_DECL_, param)
-
-// Expand: `[default_value_]`, EMPTY if no parameter default value.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT(param) \
- BOOST_CLOSURE_DETAIL_PP_KEYWORD_DEFAULT_REMOVE_FRONT( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param))
-
-// Expand: 1 iff parameter has default value, 0 otherwise.
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_HAS_DEFAULT(param) \
- BOOST_PP_COMPL(BOOST_PP_IS_EMPTY( \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAM_DEFAULT_(param)))
-
-// All parameters.
-
-// Expand: pp-list of parameters (bound variables excluded).
+// Expand: pp-list of param-traits (no bound variables).
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_PARAMS, decl_traits)
 
-// Expand: 1 iff at least 1 parameter (bound variables excluded).
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_PARAM(decl_traits) \
- BOOST_PP_LIST_IS_CONS(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_PARAMS(decl_traits))
-
 // Expand: number of parameters with default values (0 if no default).
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_COUNT_DEFAULT_PARAMS(decl_traits) \
     BOOST_PP_IIF(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_HAVE_PARAMS(decl_traits), \

Deleted: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
+++ (empty file)
@@ -1,15 +0,0 @@
-
-#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURN_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURN_HPP_
-
-#include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-
-// PUBLIC //
-
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS(decl_traits) \
- BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
- BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_RETURNS, decl_traits)
-
-#endif // #include guard
-

Copied: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_returns.hpp (from r76025, /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp)
==============================================================================
--- /sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_return.hpp (original)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_returns.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -1,12 +1,13 @@
 
-#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURN_HPP_
-#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURN_HPP_
+#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS_HPP_
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS_HPP_
 
 #include <boost/closure/aux_/preprocessor/traits/decl_/index.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
 
 // PUBLIC //
 
+// Expand: pp-list of result types (size <= 1 after validation).
 #define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_RETURNS(decl_traits) \
     BOOST_PP_TUPLE_ELEM(BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_MAX, \
             BOOST_CLOSURE_AUX_PP_DECL_TRAITS_INDEX_RETURNS, decl_traits)

Modified: sandbox/closure/boost/closure/detail/preprocessor/keyword/bind.hpp
==============================================================================
--- sandbox/closure/boost/closure/detail/preprocessor/keyword/bind.hpp (original)
+++ sandbox/closure/boost/closure/detail/preprocessor/keyword/bind.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -24,33 +24,33 @@
 // Is.
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_FRONT(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_IS_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_IS_FRONT(tokens, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_IS_)
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_BACK(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_IS_BACK(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_IS_BACK(tokens, \
             _BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_IS)
 
 // Remove.
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_REMOVE_FRONT(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_FRONT(tokens, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_FRONT, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_REMOVE_)
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_REMOVE_BACK(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_BACK(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_BACK(tokens, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_BACK, \
             _BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_REMOVE)
 
 // Add.
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_ADD_FRONT(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_ADD_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_ADD_FRONT(tokens, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_FRONT, bind)
 
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_ADD_BACK(tokens) \
- BOOST_CLOSRE_DETAIL_PP_KEYWORD_FACILITY_ADD_BACK(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_ADD_BACK(tokens, \
             BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_BACK, bind)
 
 #endif // #include guard

Modified: sandbox/closure/boost/closure/detail/preprocessor/keyword/const.hpp
==============================================================================
--- sandbox/closure/boost/closure/detail/preprocessor/keyword/const.hpp (original)
+++ sandbox/closure/boost/closure/detail/preprocessor/keyword/const.hpp 2011-12-17 15:19:50 EST (Sat, 17 Dec 2011)
@@ -7,9 +7,9 @@
 #ifndef BOOST_CLOSURE_DETAIL_PP_KEYWORD_CONST_HPP_
 #define BOOST_CLOSURE_DETAIL_PP_KEYWORD_CONST_HPP_
 
-#include <boost/closure/detail/preprocessor/facility/is.hpp>
-#include <boost/closure/detail/preprocessor/facility/add.hpp>
-#include <boost/closure/detail/preprocessor/facility/remove.hpp>
+#include <boost/closure/detail/preprocessor/keyword/facility/is.hpp>
+#include <boost/closure/detail/preprocessor/keyword/facility/add.hpp>
+#include <boost/closure/detail/preprocessor/keyword/facility/remove.hpp>
 
 // PRIVATE //
 


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