Update of /cvsroot/boost/boost/boost/xpressive/proto
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19213/proto
Modified Files:
args.hpp matches.hpp proto_fwd.hpp ref.hpp
Log Message:
shuffling some namespaces around for ADL reasons
Index: args.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/args.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- args.hpp 15 Jun 2007 18:27:59 -0000 1.9
+++ args.hpp 4 Jul 2007 21:40:16 -0000 1.10
@@ -23,34 +23,38 @@
namespace boost { namespace proto
{
- #define BOOST_PROTO_DEFINE_ARG_N(z, n, data)\
- typedef BOOST_PP_CAT(Arg, n) BOOST_PP_CAT(arg, n);
-
- #define BOOST_PROTO_DEFINE_VOID_N(z, n, data)\
- typedef mpl::void_ BOOST_PP_CAT(arg, n);
-
- /// \brief A type sequence, for use as the 2nd parameter to the \c
expr\<\> class template.
- ///
- /// A type sequence, for use as the 2nd parameter to the \c expr\<\>
class template.
- /// The types in the sequence correspond to the children of a node in
an expression tree.
- template< typename Arg0 >
- struct args0
+ namespace argsns_
{
- BOOST_STATIC_CONSTANT(long, size = 0);
- typedef Arg0 arg0;
- BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY,
BOOST_PROTO_DEFINE_VOID_N, ~)
+ #define BOOST_PROTO_DEFINE_ARG_N(z, n, data)\
+ typedef BOOST_PP_CAT(Arg, n) BOOST_PP_CAT(arg, n);
- /// INTERNAL ONLY
+ #define BOOST_PROTO_DEFINE_VOID_N(z, n, data)\
+ typedef mpl::void_ BOOST_PP_CAT(arg, n);
+
+ /// \brief A type sequence, for use as the 2nd parameter to the \c
expr\<\> class template.
///
- typedef Arg0 back_;
- };
+ /// A type sequence, for use as the 2nd parameter to the \c
expr\<\> class template.
+ /// The types in the sequence correspond to the children of a node
in an expression tree.
+ template< typename Arg0 >
+ struct args0
+ {
+ BOOST_STATIC_CONSTANT(long, size = 0);
+ typedef Arg0 arg0;
+ BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY,
BOOST_PROTO_DEFINE_VOID_N, ~)
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY,
<boost/xpressive/proto/args.hpp>))
- #include BOOST_PP_ITERATE()
+ /// INTERNAL ONLY
+ ///
+ typedef Arg0 back_;
+ };
- #undef BOOST_PROTO_DEFINE_ARG_N
- #undef BOOST_PROTO_DEFINE_VOID_N
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY,
<boost/xpressive/proto/args.hpp>))
+ #include BOOST_PP_ITERATE()
+
+ #undef BOOST_PROTO_DEFINE_ARG_N
+ #undef BOOST_PROTO_DEFINE_VOID_N
+ }
+ using namespace argsns_;
}}
#endif
Index: matches.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/matches.hpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- matches.hpp 21 Jun 2007 23:11:11 -0000 1.52
+++ matches.hpp 4 Jul 2007 21:40:16 -0000 1.53
@@ -332,9 +332,11 @@
// handle proto::switch_
template<typename Expr, typename Cases>
struct matches_impl<Expr, switch_<Cases> >
- : matches_impl<Expr, typename Cases::template case_<typename
Expr::proto_tag>::proto_base_expr>
+ : matches_impl<
+ Expr
+ , typename Cases::template case_<typename
Expr::proto_tag>::proto_base_expr
+ >
{};
-
}
template<typename Expr, typename Grammar>
@@ -342,120 +344,128 @@
: detail::matches_impl<typename Expr::proto_base_expr, typename
Grammar::proto_base_expr>
{};
- template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename
G)>
- struct or_
+ template<typename Grammar>
+ struct vararg
+ : Grammar
{
- typedef or_ proto_base_expr;
+ typedef void proto_is_vararg_;
+ };
- template<typename Expr, typename State, typename Visitor>
- struct apply
- {
- typedef typename detail::matches_impl<Expr, or_>::which which;
- typedef typename which::template apply<Expr, State,
Visitor>::type type;
- };
+ template<typename T>
+ struct exact
+ {};
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
- {
- typedef typename detail::matches_impl<Expr, or_>::which which;
- return which::call(expr, state, visitor);
- }
- };
+ template<typename T>
+ struct convertible_to
+ {};
- template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename
G)>
- struct and_
+ namespace wildcardns_
{
- typedef and_ proto_base_expr;
-
- template<typename Expr, typename State, typename Visitor>
- struct apply
+ struct _
+ : has_identity_transform
{
- typedef typename detail::last<and_>::type which;
- typedef typename which::template apply<Expr, State,
Visitor>::type type;
+ typedef _ proto_base_expr;
+ typedef void proto_is_wildcard_;
};
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
- {
- typedef typename detail::last<and_>::type which;
- return which::call(expr, state, visitor);
- }
- };
+ template<typename T>
+ transform::detail::yes_type is_wildcard_expression_fun(T const *);
+ }
- template<typename Cases>
- struct switch_
+ namespace control
{
- typedef switch_ proto_base_expr;
+ // not_
+ template<typename Grammar>
+ struct not_
+ : has_identity_transform
+ {
+ typedef not_ proto_base_expr;
+ };
- template<typename Expr, typename State, typename Visitor>
- struct apply
- : Cases::template case_<typename Expr::proto_tag>::template
apply<Expr, State, Visitor>
+ // if_
+ template<typename Condition, typename Then, typename Else>
+ struct if_
+ : or_<
+ and_<if_<Condition>, Then>
+ , and_<not_<if_<Condition> >, Else>
+ >
{};
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
- {
- return Cases::template case_<typename
Expr::proto_tag>::call(expr, state, visitor);
- }
- };
+ template<typename Condition, typename Then>
+ struct if_<Condition, Then, void>
+ : and_<if_<Condition>, Then>
+ {};
- namespace placeholder_detail_
- {
- struct _
+ template<typename Condition>
+ struct if_<Condition, void, void>
: has_identity_transform
{
- typedef _ proto_base_expr;
- typedef void proto_is_placeholder_;
+ typedef if_ proto_base_expr;
};
- template<typename T>
- transform::detail::yes_type is_placeholder_expression_fun(T const
*);
- }
+ // or_
+ template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY,
typename G)>
+ struct or_
+ {
+ typedef or_ proto_base_expr;
- template<typename Grammar>
- struct not_
- : has_identity_transform
- {
- typedef not_ proto_base_expr;
- };
+ template<typename Expr, typename State, typename Visitor>
+ struct apply
+ {
+ typedef typename detail::matches_impl<Expr, or_>::which
which;
+ typedef typename which::template apply<Expr, State,
Visitor>::type type;
+ };
- template<typename Grammar>
- struct vararg
- : Grammar
- {
- typedef void proto_is_vararg_;
- };
+ template<typename Expr, typename State, typename Visitor>
+ static typename apply<Expr, State, Visitor>::type
+ call(Expr const &expr, State const &state, Visitor &visitor)
+ {
+ typedef typename detail::matches_impl<Expr, or_>::which
which;
+ return which::call(expr, state, visitor);
+ }
+ };
- template<typename T>
- struct exact
- {};
+ // and_
+ template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY,
typename G)>
+ struct and_
+ {
+ typedef and_ proto_base_expr;
- template<typename Condition, typename Then, typename Else>
- struct if_
- : or_<
- and_<if_<Condition>, Then>
- , and_<not_<if_<Condition> >, Else>
- >
- {};
+ template<typename Expr, typename State, typename Visitor>
+ struct apply
+ {
+ typedef typename detail::last<and_>::type which;
+ typedef typename which::template apply<Expr, State,
Visitor>::type type;
+ };
- template<typename Condition, typename Then>
- struct if_<Condition, Then, void>
- : and_<if_<Condition>, Then>
- {};
+ template<typename Expr, typename State, typename Visitor>
+ static typename apply<Expr, State, Visitor>::type
+ call(Expr const &expr, State const &state, Visitor &visitor)
+ {
+ typedef typename detail::last<and_>::type which;
+ return which::call(expr, state, visitor);
+ }
+ };
- template<typename Condition>
- struct if_<Condition, void, void>
- : has_identity_transform
- {
- typedef if_ proto_base_expr;
- };
+ // switch_
+ template<typename Cases>
+ struct switch_
+ {
+ typedef switch_ proto_base_expr;
- template<typename T>
- struct convertible_to
- {};
+ template<typename Expr, typename State, typename Visitor>
+ struct apply
+ : Cases::template case_<typename Expr::proto_tag>::template
apply<Expr, State, Visitor>
+ {};
+
+ template<typename Expr, typename State, typename Visitor>
+ static typename apply<Expr, State, Visitor>::type
+ call(Expr const &expr, State const &state, Visitor &visitor)
+ {
+ return Cases::template case_<typename
Expr::proto_tag>::call(expr, state, visitor);
+ }
+ };
+ }
}}
#endif
Index: proto_fwd.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/proto_fwd.hpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- proto_fwd.hpp 1 Jul 2007 07:43:05 -0000 1.83
+++ proto_fwd.hpp 4 Jul 2007 21:40:17 -0000 1.84
@@ -116,12 +116,12 @@
struct function;
}
- namespace placeholder_detail_
+ namespace wildcardns_
{
struct _;
}
- using placeholder_detail_::_;
+ using wildcardns_::_;
struct default_generator;
@@ -160,8 +160,13 @@
using ops::is_proto_expr;
- template<typename Expr>
- struct ref_;
+ namespace refns_
+ {
+ template<typename Expr>
+ struct ref_;
+ }
+
+ using refns_::ref_;
template<typename Expr, typename Grammar>
struct matches;
@@ -172,28 +177,37 @@
template<typename T>
struct convertible_to;
- template<
- typename Grammar0
- , typename Grammar1
- ,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2),
typename G, void)
- >
- struct or_;
+ namespace control
+ {
+ template<
+ typename Grammar0
+ , typename Grammar1
+ ,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2),
typename G, void)
+ >
+ struct or_;
- template<
- typename Grammar0
- , typename Grammar1
- ,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2),
typename G, void)
- >
- struct and_;
+ template<
+ typename Grammar0
+ , typename Grammar1
+ ,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2),
typename G, void)
+ >
+ struct and_;
- template<typename Condition, typename Then = void, typename Else = void>
- struct if_;
+ template<typename Condition, typename Then = void, typename Else =
void>
+ struct if_;
- template<typename Cases>
- struct switch_;
+ template<typename Cases>
+ struct switch_;
- template<typename Grammar>
- struct not_;
+ template<typename Grammar>
+ struct not_;
+ }
+
+ using control::if_;
+ using control::or_;
+ using control::and_;
+ using control::not_;
+ using control::switch_;
struct proto_expr_tag;
struct proto_ref_tag;
@@ -373,10 +387,10 @@
struct default_factory;
- no_type is_placeholder_expression_fun(...);
+ no_type is_wildcard_expression_fun(...);
template<typename T>
- struct is_placeholder_expression;
+ struct is_wildcard_expression;
}
template<typename Grammar, typename N = mpl::long_<0> >
Index: ref.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/ref.hpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ref.hpp 16 Jun 2007 05:46:16 -0000 1.29
+++ ref.hpp 4 Jul 2007 21:40:17 -0000 1.30
@@ -26,40 +26,43 @@
BOOST_PP_CAT(proto_arg, n);\
/**/
- template<typename Expr>
- struct ref_
+ namespace refns_
{
- typedef typename Expr::proto_base_expr proto_base_expr;
- typedef typename Expr::proto_tag proto_tag;
- typedef typename Expr::proto_args proto_args;
- typedef typename Expr::proto_arity proto_arity;
- typedef typename Expr::proto_domain proto_domain;
- typedef proto_ref_tag fusion_tag;
- typedef void proto_is_ref_;
- typedef void proto_is_expr_;
- typedef Expr proto_derived_expr;
+ template<typename Expr>
+ struct ref_
+ {
+ typedef typename Expr::proto_base_expr proto_base_expr;
+ typedef typename Expr::proto_tag proto_tag;
+ typedef typename Expr::proto_args proto_args;
+ typedef typename Expr::proto_arity proto_arity;
+ typedef typename Expr::proto_domain proto_domain;
+ typedef proto_ref_tag fusion_tag;
+ typedef void proto_is_ref_;
+ typedef void proto_is_expr_;
+ typedef Expr proto_derived_expr;
- BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_ARG, _)
+ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_ARG, _)
- typename mpl::if_<is_const<Expr>, proto_base_expr const &,
proto_base_expr &>::type
- proto_base() const
- {
- return this->expr.proto_base();
- }
+ typename mpl::if_<is_const<Expr>, proto_base_expr const &,
proto_base_expr &>::type
+ proto_base() const
+ {
+ return this->expr.proto_base();
+ }
- static ref_<Expr> make(Expr &expr)
- {
- ref_<Expr> that = {expr};
- return that;
- }
+ static ref_<Expr> make(Expr &expr)
+ {
+ ref_<Expr> that = {expr};
+ return that;
+ }
- Expr &expr;
- };
+ Expr &expr;
+ };
- // ref_-to-ref_ is not allowed. this will cause a compile error.
- template<typename Expr>
- struct ref_<ref_<Expr> >
- {};
+ // ref_-to-ref_ is not allowed. this will cause a compile error.
+ template<typename Expr>
+ struct ref_<ref_<Expr> >
+ {};
+ }
#undef BOOST_PROTO_ARG
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs