|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68917 - in sandbox/local/libs/local/params_name/aux_/preprocessor/sign: params parse parse/params_ parse/params_/seq_validate_ parsed_/params parsed_/params/validate_
From: lorcaminiti_at_[hidden]
Date: 2011-02-15 13:21:32
Author: lcaminiti
Date: 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
New Revision: 68917
URL: http://svn.boost.org/trac/boost/changeset/68917
Log:
Fixed parsing macros.
Added:
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.hpp
- copied, changed from r68916, /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate.hpp
- copied, changed from r68916, /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_/
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_/defaults.hpp (contents, props changed)
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind_default.hpp (contents, props changed)
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/set_error.hpp
- copied unchanged from r68916, /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/set_error.cpp
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate_/
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate_/this_count.hpp (contents, props changed)
Removed:
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/set_error.cpp
Text files modified:
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/error.hpp | 5 +
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/unbind.hpp | 14 ++--
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.hpp | 5 +
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/is_void.hpp | 2
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq.hpp | 21 +++---
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_valid.hpp | 18 +++--
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate.hpp | 111 ++-------------------------------------
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind.hpp | 53 ++----------------
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_bind_this_count.hpp | 2
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_const_bind_this_count.hpp | 3
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/nil.hpp | 2
sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate.hpp | 30 +---------
12 files changed, 58 insertions(+), 208 deletions(-)
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/error.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/error.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/error.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -4,6 +4,7 @@
#include "../parsed_/params/index.hpp"
#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/facilities/is_empty.hpp>
// Expand to `EMPTY` if no error, to `ERROR_message_text EMPTY` otherwise.
#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_ERROR(params) \
@@ -11,5 +12,9 @@
BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_INDEX_ERROR, \
params)
+#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_HAVE_ERROR(params) \
+ BOOST_PP_IS_EMPTY(BOOST_LOCAL_AUX_PP_SIGN_PARAMS_ERROR(params) \
+ (/* expand empty */) )
+
#endif // #include guard
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/unbind.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/unbind.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/params/unbind.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -16,13 +16,15 @@
// Expand to param declaration: [auto | register] type name.
#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_DECL(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_AUX_SIGN_PARAMS_UNBIND_PARAM_INDEX_MAX_, \
- BOOST_LOCAL_AUX_SIGN_PARAMS_UNBIND_PARAM_INDEX_DECL_, param)
+ BOOST_PP_TUPLE_ELEM( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_INDEX_MAX_, \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_INDEX_DECL_, param)
// Expand to param default value (empty if none).
#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_DEFAULT(param) \
- BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_AUX_SIGN_PARAMS_UNBIND_PARAM_INDEX_MAX_, \
- BOOST_LOCAL_AUX_SIGN_PARAMS_UNBIND_PARAM_INDEX_DEFAULT_, param)
+ BOOST_PP_TUPLE_ELEM( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_INDEX_MAX_, \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_INDEX_DEFAULT_, param)
// Expand to 1 if param has default value, 0 otherwise.
#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_HAS_DEFAULT(param) \
@@ -31,8 +33,8 @@
// Expand to nil-seq of ALL unbind params.
#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params) \
- BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_AUX_PP_SIGN_PARAMS_INDEX_MAX_, \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_INDEX_UNBIND_, params)
+ BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_INDEX_MAX, \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_INDEX_UNBIND, params)
#endif // #include guard
Deleted: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
+++ (empty file)
@@ -1,29 +0,0 @@
-
-#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_HPP_
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_HPP_
-
-#include "params_/is_void.hpp"
-#include "params_/seq.hpp"
-#include <boost/preprocessor/control/iif.hpp>
-
-// Private API.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSSE_PARAMS_NONE_(unused) \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_NIL
-
-// Public API.
-
-// parenthesized_params: Empty ``, or `void`, or `(void)` for no params
-// Or, `{([auto | register] param_type param_name)[(default default_value)]
-// | ([const] bind [&] bind_name}+` where `bind_name` can be `this` (but not
-// `&this` as usual in C++).
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS(parenthesized_params) \
- BOOST_PP_IIF(BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_IS_VOID( \
- parenthesized_params), \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_NONE_ \
- , \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ \
- )(parenthesized_params)
-
-#endif // #include guard
-
Copied: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.hpp (from r68916, /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp)
==============================================================================
--- /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.cpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -4,12 +4,13 @@
#include "params_/is_void.hpp"
#include "params_/seq.hpp"
+#include "../parsed_/params/nil.hpp"
#include <boost/preprocessor/control/iif.hpp>
// Private API.
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSSE_PARAMS_NONE_(unused) \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_NIL
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_NONE_(unused) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL
// Public API.
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/is_void.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/is_void.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/is_void.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -33,7 +33,7 @@
BOOST_PP_IIF(BOOST_PP_IS_UNARY(parenthesized_params), \
BOOST_LOCLAL_AUX_PP_SIGN_PARSE_PARAMS_IS_VOID_SEQ_ \
, /* else, it's a sequence */ \
- BOOST_LOCAL_AUX_PP_SIGN_PRASE_PARAMS_IS_VOID_TOKEN_ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_IS_VOID_TOKEN_ \
)(parenthesized_params)
#endif // #include guard
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -2,21 +2,23 @@
#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_HPP_
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_HPP_
-#include "seq_validate_defaults.hpp"
-#include "validate_this_count.hpp"
-#include "../parsed_/params/set_error.hpp"
-#include <boost/preprocessor/control.iif>
-#include <boost/preprocessor/facilities/is_empty.iif>
+#include "seq_validate.hpp"
+#include "seq_valid.hpp"
+#include "../../parsed_/params/nil.hpp"
+#include "../../parsed_/params/set_error.hpp"
+#include "../../parsed_/params/validate.hpp"
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/facilities/is_empty.hpp>
// Private API.
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_YES_(params_seq, unused) \
- BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_SEQ_VALID_(params_seq))
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID(params_seq))
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_NO_(unused, error) \
BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_NIL, error)
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL, error)
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_( \
params_seq, defaults_error) \
@@ -30,8 +32,7 @@
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ(params_seq) \
BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_(params_seq, \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS( \
- params_seq))
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE(params_seq))
#endif // #include guard
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_valid.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_valid.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_valid.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -2,11 +2,15 @@
#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID_HPP_
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID_HPP_
-#include "../../../parsed_/params/unbind.hpp"
-#include "../../../parsed_/params/bind.hpp"
-#include "../../../parsed_/params/const_bind.hpp"
-#include "../../../../keyword/const_bind.hpp"
-#include "../../../../keyword/bind.hpp"
+#include "../../parsed_/params/nil.hpp"
+#include "../../parsed_/params/append_unbind.hpp"
+#include "../../parsed_/params/append_unbind_default.hpp"
+#include "../../parsed_/params/append_const_bind.hpp"
+#include "../../parsed_/params/inc_const_bind_this_count.hpp"
+#include "../../parsed_/params/append_bind.hpp"
+#include "../../parsed_/params/inc_bind_this_count.hpp"
+#include "../../../keyword/const_bind.hpp"
+#include "../../../keyword/bind.hpp"
#include <boost/detail/preprocessor/keyword/default.hpp>
#include <boost/detail/preprocessor/keyword/this.hpp>
#include <boost/preprocessor/control/iif.hpp>
@@ -18,7 +22,7 @@
BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT(params, \
BOOST_DETAIL_PP_KEYWORD_DEFAULT_REMOVE_FRONT(elem))
-#define BOOST_LOCAL_AUX_PP_PARSE_SIGN_PARAMS_SEQ_VALID_UNBIND_(params, elem) \
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID_UNBIND_(params, elem) \
BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND(params, elem)
// Private: Parse const binds.
@@ -82,7 +86,7 @@
// its previous element is a unbind param (no const-bind and no bind).
#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID(params_seq) \
BOOST_PP_SEQ_FOLD_LEFT(BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALID_, \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_NIL, params_seq)
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL, params_seq)
#endif // #include guard
Copied: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate.hpp (from r68916, /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp)
==============================================================================
--- /sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -1,111 +1,12 @@
-#ifndef BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
-#define BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
+#ifndef BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_HPP_
+#define BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_HPP_
-#include "../../../keyword/const_bind.hpp"
-#include "../../../keyword/bind.hpp"
-#include <boost/detail/preprocessor/keyword/default.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/logical/bitand.hpp>
-#include <boost/preprocessor/logical/bitor.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-#include <boost/preprocessor/arithmetic/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 "seq_validate_/defaults.hpp"
-// Private API.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_( \
- elem) \
- BOOST_PP_NOT(BOOST_PP_BITOR( \
- BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT(elem) \
- , BOOST_PP_BITOR( \
- BOOST_LOCAL_AUX_PP_KEYWORD_IS_CONST_BIND_FRONT(elem) \
- , BOOST_LOCAL_AUX_PP_KEYWORD_IS_BIND_FRONT(elem) \
- ) \
- ))
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_( \
- params_seq, index, error) \
- BOOST_PP_IIF( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_(\
- BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(index), params_seq)), \
- error /* no err, fwd existing one if any */ \
- , \
- BOOST_PP_CAT( \
- ERROR_default_must_follow_an_unbound_parameter_at_element_number_, \
- BOOST_PP_INC(index)) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_( \
- params_seq, index, error) \
- BOOST_PP_IF(index, /* can't use IIF because index can be any number */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_ \
- , \
- ERROR_default_value_cannot_be_specified_as_the_first_element \
- BOOST_PP_TUPLE_EAT(3) \
- )(params_seq, index, error)
-
-// Private: While's operation.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
- params_seq, index, error) \
- ( \
- params_seq \
- , \
- BOOST_PP_INC(index) \
- , \
- BOOST_PP_IIF(BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT( \
- BOOST_PP_SEQ_ELEM(index, params_seq)), \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_ \
- , \
- error BOOST_PP_TUPLE_EAT(3) /* no err, fwd existing one if any */\
- )(params_seq, index, error) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_(d, \
- params_index_error) \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
- BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
-
-// Private: While's predicate.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
- params_seq, index, error) \
- BOOST_PP_BITAND( \
- BOOST_PP_IS_EMPTY(error (/* expand empty */) ) \
- , BOOST_PP_LESS(index, BOOST_PP_SEQ_SIZE(params_seq)) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_(d, \
- params_index_error) \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
- BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
-
-// Public API.
-
-// 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.
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS( \
- params_seq) \
- BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE( \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_, \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_, \
- (params_seq, 0, BOOST_PP_EMPTY)))
+// Validate params seq before starting to parse it.
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE(params_seq) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS(params_seq)
#endif // #include guard
Added: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_/defaults.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_/defaults.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -0,0 +1,110 @@
+
+#ifndef BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
+#define BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
+
+#include "../../../../keyword/const_bind.hpp"
+#include "../../../../keyword/bind.hpp"
+#include <boost/detail/preprocessor/keyword/default.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/control/while.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/facilities/is_empty.hpp>
+#include <boost/preprocessor/logical/bitand.hpp>
+#include <boost/preprocessor/logical/bitor.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+#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>
+
+// Private API.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_( \
+ elem) \
+ BOOST_PP_NOT(BOOST_PP_BITOR( \
+ BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT(elem) \
+ , BOOST_PP_BITOR( \
+ BOOST_LOCAL_AUX_PP_KEYWORD_IS_CONST_BIND_FRONT(elem) \
+ , BOOST_LOCAL_AUX_PP_KEYWORD_IS_BIND_FRONT(elem) \
+ ) \
+ ))
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_( \
+ params_seq, index, error) \
+ BOOST_PP_IIF( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_(\
+ BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(index), params_seq)), \
+ error /* no err, fwd existing one if any */ \
+ , \
+ BOOST_PP_CAT(BOOST_PP_CAT(ERROR_default_value_at_element_, \
+ BOOST_PP_INC(index)), _must_follow_an_unbound_parameter) \
+ )
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_( \
+ params_seq, index, error) \
+ BOOST_PP_IF(index, /* can't use IIF because index can be any number */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_ \
+ , \
+ ERROR_default_value_cannot_be_specified_as_the_first_element \
+ BOOST_PP_TUPLE_EAT(3) \
+ )(params_seq, index, error)
+
+// Private: While's operation.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
+ params_seq, index, error) \
+ ( \
+ params_seq \
+ , \
+ BOOST_PP_INC(index) \
+ , \
+ BOOST_PP_IIF(BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT( \
+ BOOST_PP_SEQ_ELEM(index, params_seq)), \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_ \
+ , \
+ error BOOST_PP_TUPLE_EAT(3) /* no err, fwd existing one if any */\
+ )(params_seq, index, error) \
+ )
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_(d, \
+ params_index_error) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
+ BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
+ BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
+ BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
+
+// Private: While's predicate.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
+ params_seq, index, error) \
+ BOOST_PP_BITAND( \
+ BOOST_PP_IS_EMPTY(error (/* expand empty */) ) \
+ , BOOST_PP_LESS(index, BOOST_PP_SEQ_SIZE(params_seq)) \
+ )
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_(d, \
+ params_index_error) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
+ BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
+ BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
+ BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
+
+// Public API.
+
+// 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.
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS( \
+ params_seq) \
+ BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_, \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_, \
+ (params_seq, 0, BOOST_PP_EMPTY)))
+
+#endif // #include guard
+
Deleted: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parse/params_/seq_validate_defaults.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
+++ (empty file)
@@ -1,111 +0,0 @@
-
-#ifndef BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
-#define BOOST_LOCAL_AUX_PP_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_HPP_
-
-#include "../../../keyword/const_bind.hpp"
-#include "../../../keyword/bind.hpp"
-#include <boost/detail/preprocessor/keyword/default.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/control/while.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/logical/bitand.hpp>
-#include <boost/preprocessor/logical/bitor.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-#include <boost/preprocessor/arithmetic/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>
-
-// Private API.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_( \
- elem) \
- BOOST_PP_NOT(BOOST_PP_BITOR( \
- BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT(elem) \
- , BOOST_PP_BITOR( \
- BOOST_LOCAL_AUX_PP_KEYWORD_IS_CONST_BIND_FRONT(elem) \
- , BOOST_LOCAL_AUX_PP_KEYWORD_IS_BIND_FRONT(elem) \
- ) \
- ))
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_( \
- params_seq, index, error) \
- BOOST_PP_IIF( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_SEQ_VALIDATE_DEFAULTS_UNBIND_(\
- BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(index), params_seq)), \
- error /* no err, fwd existing one if any */ \
- , \
- BOOST_PP_CAT( \
- ERROR_default_must_follow_an_unbound_parameter_at_element_number_, \
- BOOST_PP_INC(index)) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_( \
- params_seq, index, error) \
- BOOST_PP_IF(index, /* can't use IIF because index can be any number */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PREV_ \
- , \
- ERROR_default_value_cannot_be_specified_as_the_first_element \
- BOOST_PP_TUPLE_EAT(3) \
- )(params_seq, index, error)
-
-// Private: While's operation.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
- params_seq, index, error) \
- ( \
- params_seq \
- , \
- BOOST_PP_INC(index) \
- , \
- BOOST_PP_IIF(BOOST_DETAIL_PP_KEYWORD_IS_DEFAULT_FRONT( \
- BOOST_PP_SEQ_ELEM(index, params_seq)), \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_INDEX_ \
- , \
- error BOOST_PP_TUPLE_EAT(3) /* no err, fwd existing one if any */\
- )(params_seq, index, error) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_(d, \
- params_index_error) \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_DATA_( \
- BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
-
-// Private: While's predicate.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
- params_seq, index, error) \
- BOOST_PP_BITAND( \
- BOOST_PP_IS_EMPTY(error (/* expand empty */) ) \
- , BOOST_PP_LESS(index, BOOST_PP_SEQ_SIZE(params_seq)) \
- )
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_(d, \
- params_index_error) \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_DATA_( \
- BOOST_PP_TUPLE_ELEM(3, 0, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 1, params_index_error), \
- BOOST_PP_TUPLE_ELEM(3, 2, params_index_error))
-
-// Public API.
-
-// 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.
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS( \
- params_seq) \
- BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE( \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_PRED_, \
- BOOST_LOCAL_AUX_PP_SIGN_PARSE_PARAMS_SEQ_VALIDATE_DEFAULTS_OP_, \
- (params_seq, 0, BOOST_PP_EMPTY)))
-
-#endif // #include guard
-
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -6,65 +6,24 @@
#include "../../params/bind.hpp"
#include "../../params/const_bind.hpp"
#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/seq/pop_back.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-
-// Private API.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT_( \
- unbind_nilseq, default_value) \
- BOOST_PP_SEQ_POP_BACK(unbind_nilseq) \
- (( /* seq of 2-tuple params */ \
- /* last appended classifier type and name */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM(BOOST_PP_SEQ_ELEM( \
- /* nil-seq so can always safely decrement size */ \
- BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(unbind_nilseq)), \
- unbind_nilseq)) \
- , \
- /* trailing EMPTY because defaults are optional */ \
- default_value BOOST_PP_EMPTY \
- ))
-
-// Public API.
-
-// default_value: a valid parameter default value (`-1`, etc)
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT( \
- params, default_value) \
- ( /* unbind params and defaults */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT_( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params), \
- default_value) /* append default to last added param */ \
- , /* const-bind names */ \
- BOOST_LOCAL_AUX_PP_PARAMS_CONST_BIND(params) \
- , /* const-bind `this` count */ \
- BOOST_LOCAL_AUX_PP_PARAMS_CONST_BIND_THIS_COUNT(params) \
- , /* bind names */ \
- BOOST_LOCAL_AUX_PP_PARAMS_BIND(params) \
- , /* bind `this` count */ \
- BOOST_LOCAL_AUX_PP_PARAMS_BIND_THIS_COUNT(params) \
- , /* error message (if any) */ \
- BOOST_LOCAL_AUX_PP_PARAMS_ERROR(params) \
- )
// unbind_classified_type_and_name: [auto | register] type name
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND( \
params, unbind_classified_type_and_name) \
( /* unbind params and defaults */ \
- BOOST_LOCAL_AUX_PP_PARAMS_UNBIND(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params) \
/* append param (with no default -- EMPTY) */ \
((unbind_classified_type_and_name, BOOST_PP_EMPTY)) \
, /* const-bind names */ \
- BOOST_LOCAL_AUX_PP_PARAMS_CONST_BIND(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND(params) \
, /* const-bind `this` count */ \
- BOOST_LOCAL_AUX_PP_PARAMS_CONST_BIND_THIS_COUNT(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND_THIS_COUNT(params) \
, /* bind names */ \
- BOOST_LOCAL_AUX_PP_PARAMS_BIND(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND(params) \
, /* bind `this` count */ \
- BOOST_LOCAL_AUX_PP_PARAMS_BIND_THIS_COUNT(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND_THIS_COUNT(params) \
, /* error message (if any) */ \
- BOOST_LOCAL_AUX_PP_PARAMS_ERROR(params) \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_ERROR(params) \
)
#endif // #include guard
Added: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind_default.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/append_unbind_default.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -0,0 +1,51 @@
+
+#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSED_APPEND_UNBIND_DEFAULT_HPP_
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_APPEND_UNBIND_DEFAULT_HPP_
+
+#include "../../params/unbind.hpp"
+#include "../../params/bind.hpp"
+#include "../../params/const_bind.hpp"
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/seq/pop_back.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+
+// Private API.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT_( \
+ unbind_nilseq, default_value) \
+ BOOST_PP_SEQ_POP_BACK(unbind_nilseq) \
+ (( /* seq of 2-tuple params */ \
+ /* last appended classifier type and name */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND_PARAM_DECL(BOOST_PP_SEQ_ELEM( \
+ /* nil-seq so can always safely decrement size */ \
+ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(unbind_nilseq)), \
+ unbind_nilseq)) \
+ , \
+ /* trailing EMPTY because defaults are optional */ \
+ default_value BOOST_PP_EMPTY \
+ ))
+
+// Public API.
+
+// default_value: a valid parameter default value (`-1`, etc)
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT( \
+ params, default_value) \
+ ( /* unbind params and defaults */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_APPEND_UNBIND_DEFAULT_( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params), \
+ default_value) /* append default to last added param */ \
+ , /* const-bind names */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND(params) \
+ , /* const-bind `this` count */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND_THIS_COUNT(params) \
+ , /* bind names */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND(params) \
+ , /* bind `this` count */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND_THIS_COUNT(params) \
+ , /* error message (if any) */ \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_ERROR(params) \
+ )
+
+#endif // #include guard
+
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_bind_this_count.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_bind_this_count.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_bind_this_count.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -5,7 +5,7 @@
#include "../../params/unbind.hpp"
#include "../../params/bind.hpp"
#include "../../params/const_bind.hpp"
-#include <boost/preprocessor/arithmentic/inc.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_INC_BIND_THIS_COUNT(params) \
( /* unbind params and defaults */ \
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_const_bind_this_count.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_const_bind_this_count.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/inc_const_bind_this_count.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -8,7 +8,8 @@
#include "../../params/const_bind.hpp"
#include <boost/preprocessor/arithmetic/inc.hpp>
-#define BOOST_LOCAL_AUX_PP_SIGN_PARAMS_INC_CONST_BIND_THIS_COUNT(params) \
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_INC_CONST_BIND_THIS_COUNT( \
+ params) \
( /* unbind params and defaults */ \
BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params) \
, /* const-bind names */ \
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/nil.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/nil.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/nil.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -2,7 +2,7 @@
#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL_HPP_
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL_HPP_
-#include <boost/preprcoessor/facilities/empty.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
// See "index_.hpp".
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_NIL \
Deleted: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/set_error.cpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/set_error.cpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
+++ (empty file)
@@ -1,26 +0,0 @@
-
-#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR_HPP_
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR_HPP_
-
-#include "../../params/unbind.hpp"
-#include "../../params/bind.hpp"
-#include "../../params/const_bind.hpp"
-
-// error: `EMPTY` if no error, `ERROR_message_text EMPTY` if error.
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR(params, error) \
- ( /* unbind params and defaults */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_UNBIND(params) \
- , /* const-bind names */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND(params) \
- , /* const-bind `this` count */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND_THIS_COUNT(params) \
- , /* bind names */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND(params) \
- , /* bind `this` count */ \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND_THIS_COUNT(params) \
- , /* error message (if any) */ \
- error \
- )
-
-#endif // #include guard
-
Modified: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate.hpp
==============================================================================
--- sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate.hpp (original)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -2,35 +2,11 @@
#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_HPP_
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_HPP_
-#include "../params/error.hpp"
-#include "../params/const_bind.hpp"
-#include "../params/bind.hpp"
-#include "../parsed_/params/error.hpp"
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/facilities/is_empty.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/arithmetic/greater.hpp>
-#include <boost/preprocessor/arithmetic/add.hpp>
-
-// Private API.
-
-#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_(params) \
- BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_ADD( \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND_THIS_COUNT(params), \
- BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND_THIS_COUNT(params)), 1), \
- BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR \
- , \
- params BOOST_PP_TUPLE_EAT(2) \
- )(params, ERROR_object_this_cannot_be_bound_multiple_times)
-
-// Public API.
+#include "validate_/this_count.hpp"
+// Validate params after they have been parsed.
#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE(params) \
- BOOST_PP_IIF(BOOST_LOCAL_AUX_PP_SIGN_PARAMS_HAVE_ERROR(params), \
- BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_ \
- , \
- params BOOST_PP_TUPLE_EAT(1) /* fwd existing error */ \
- )(params)
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT(params)
#endif // #include guard
Added: sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate_/this_count.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/params_name/aux_/preprocessor/sign/parsed_/params/validate_/this_count.hpp 2011-02-15 13:21:28 EST (Tue, 15 Feb 2011)
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_HPP_
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_HPP_
+
+#include "../set_error.hpp"
+#include "../../../params/error.hpp"
+#include "../../../params/const_bind.hpp"
+#include "../../../params/bind.hpp"
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/facilities/is_empty.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/comparison/greater.hpp>
+#include <boost/preprocessor/arithmetic/add.hpp>
+
+// Private API.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_(params) \
+ BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_ADD( \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_CONST_BIND_THIS_COUNT(params), \
+ BOOST_LOCAL_AUX_PP_SIGN_PARAMS_BIND_THIS_COUNT(params)), 1), \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_SET_ERROR \
+ , \
+ params BOOST_PP_TUPLE_EAT(2) \
+ )(params, ERROR_object_this_cannot_be_bound_multiple_times)
+
+// Public API.
+
+#define BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT(params) \
+ BOOST_PP_IIF(BOOST_LOCAL_AUX_PP_SIGN_PARAMS_HAVE_ERROR(params), \
+ BOOST_LOCAL_AUX_PP_SIGN_PARSED_PARAMS_VALIDATE_THIS_COUNT_ \
+ , \
+ params BOOST_PP_TUPLE_EAT(1) /* fwd existing error */ \
+ )(params)
+
+#endif // #include guard
+
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