|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62618 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2010-06-08 20:23:58
Author: eric_niebler
Date: 2010-06-08 20:23:57 EDT (Tue, 08 Jun 2010)
New Revision: 62618
URL: http://svn.boost.org/trac/boost/changeset/62618
Log:
more namespace reform
Text files modified:
trunk/boost/proto/args.hpp | 54 ++++++++++++++++++---------------------
trunk/boost/proto/proto_fwd.hpp | 19 +++----------
trunk/boost/proto/proto_typeof.hpp | 42 +++++++++++++++---------------
3 files changed, 51 insertions(+), 64 deletions(-)
Modified: trunk/boost/proto/args.hpp
==============================================================================
--- trunk/boost/proto/args.hpp (original)
+++ trunk/boost/proto/args.hpp 2010-06-08 20:23:57 EDT (Tue, 08 Jun 2010)
@@ -120,42 +120,38 @@
}
////////////////////////////////////////////////////////////////////////////////////////////
- namespace argsns_
+ #define BOOST_PROTO_DEFINE_CHILD_N(Z, N, DATA) \
+ typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(child, N); \
+ /**< INTERNAL ONLY */
+
+ #define BOOST_PROTO_DEFINE_VOID_N(z, n, data) \
+ typedef mpl::void_ BOOST_PP_CAT(child, n); \
+ /**< INTERNAL ONLY */
+
+ /// \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 term
{
+ BOOST_STATIC_CONSTANT(long, arity = 0);
+ typedef Arg0 child0;
- #define BOOST_PROTO_DEFINE_CHILD_N(Z, N, DATA) \
- typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(child, N); \
- /**< INTERNAL ONLY */
-
- #define BOOST_PROTO_DEFINE_VOID_N(z, n, data) \
- typedef mpl::void_ BOOST_PP_CAT(child, n); \
- /**< INTERNAL ONLY */
+ #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
+ #endif
- /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
+ /// INTERNAL ONLY
///
- /// 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 term
- {
- BOOST_STATIC_CONSTANT(long, arity = 0);
- typedef Arg0 child0;
-
- #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
- BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
- #endif
-
- /// INTERNAL ONLY
- ///
- typedef Arg0 back_;
- };
+ typedef Arg0 back_;
+ };
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/args.hpp>))
- #include BOOST_PP_ITERATE()
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/args.hpp>))
+ #include BOOST_PP_ITERATE()
- #undef BOOST_PROTO_DEFINE_CHILD_N
+ #undef BOOST_PROTO_DEFINE_CHILD_N
- }
////////////////////////////////////////////////////////////////////////////////////////////
}}
#endif
Modified: trunk/boost/proto/proto_fwd.hpp
==============================================================================
--- trunk/boost/proto/proto_fwd.hpp (original)
+++ trunk/boost/proto/proto_fwd.hpp 2010-06-08 20:23:57 EDT (Tue, 08 Jun 2010)
@@ -166,21 +166,12 @@
typedef detail::ignore const ignore;
- namespace argsns_
- {
- template<typename Arg0>
- struct term;
-
- #define M0(Z, N, DATA) \
- template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename Arg)> struct BOOST_PP_CAT(list, N); \
- /**/
- BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_PROTO_MAX_ARITY), M0, ~)
- #undef M0
- }
-
- using argsns_::term;
+ template<typename Arg0>
+ struct term;
- #define M0(Z, N, DATA) using argsns_::BOOST_PP_CAT(list, N);
+ #define M0(Z, N, DATA) \
+ template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename Arg)> struct BOOST_PP_CAT(list, N); \
+ /**/
BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_PROTO_MAX_ARITY), M0, ~)
#undef M0
Modified: trunk/boost/proto/proto_typeof.hpp
==============================================================================
--- trunk/boost/proto/proto_typeof.hpp (original)
+++ trunk/boost/proto/proto_typeof.hpp 2010-06-08 20:23:57 EDT (Tue, 08 Jun 2010)
@@ -73,64 +73,64 @@
BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_domain)
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::domain, 3)
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::term, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list1, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list2, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::term, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list1, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list2, 2)
// can't use PP metaprogramming here because all typeof registrations
// must be on separate lines.
#if BOOST_PROTO_MAX_ARITY >= 3
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list3, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list3, 3)
#endif
#if BOOST_PROTO_MAX_ARITY >= 4
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list4, 4)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list4, 4)
#endif
#if BOOST_PROTO_MAX_ARITY >= 5
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list5, 5)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list5, 5)
#endif
#if BOOST_PROTO_MAX_ARITY >= 6
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list6, 6)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list6, 6)
#endif
#if BOOST_PROTO_MAX_ARITY >= 7
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list7, 7)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list7, 7)
#endif
#if BOOST_PROTO_MAX_ARITY >= 8
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list8, 8)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list8, 8)
#endif
#if BOOST_PROTO_MAX_ARITY >= 9
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list9, 9)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list9, 9)
#endif
#if BOOST_PROTO_MAX_ARITY >= 10
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list10, 10)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list10, 10)
#endif
#if BOOST_PROTO_MAX_ARITY >= 11
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list11, 11)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list11, 11)
#endif
#if BOOST_PROTO_MAX_ARITY >= 12
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list12, 12)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list12, 12)
#endif
#if BOOST_PROTO_MAX_ARITY >= 13
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list13, 13)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list13, 13)
#endif
#if BOOST_PROTO_MAX_ARITY >= 14
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list14, 14)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list14, 14)
#endif
#if BOOST_PROTO_MAX_ARITY >= 15
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list15, 15)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list15, 15)
#endif
#if BOOST_PROTO_MAX_ARITY >= 16
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list16, 16)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list16, 16)
#endif
#if BOOST_PROTO_MAX_ARITY >= 17
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list17, 17)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list17, 17)
#endif
#if BOOST_PROTO_MAX_ARITY >= 18
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list18, 18)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list18, 18)
#endif
#if BOOST_PROTO_MAX_ARITY >= 19
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list19, 19)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list19, 19)
#endif
#if BOOST_PROTO_MAX_ARITY >= 20
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::argsns_::list20, 20)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list20, 20)
#endif
#define BOOST_PROTO_AUTO(Var, Expr) BOOST_AUTO(Var, boost::proto::deep_copy(Expr))
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