Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-01-28 17:56:49


Author: eric_niebler
Date: 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
New Revision: 43003
URL: http://svn.boost.org/trac/boost/changeset/43003

Log:
proto doxygen comments, misc clean-up
Text files modified:
   trunk/boost/xpressive/basic_regex.hpp | 2
   trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp | 2
   trunk/boost/xpressive/detail/core/matcher/predicate_matcher.hpp | 2
   trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp | 2
   trunk/boost/xpressive/match_results.hpp | 4
   trunk/boost/xpressive/proto/context/null.hpp | 2
   trunk/boost/xpressive/proto/debug.hpp | 48 ++++-
   trunk/boost/xpressive/proto/deep_copy.hpp | 32 +++
   trunk/boost/xpressive/proto/detail/funop.hpp | 6
   trunk/boost/xpressive/proto/detail/pop_front.hpp | 6
   trunk/boost/xpressive/proto/detail/reverse.hpp | 16
   trunk/boost/xpressive/proto/domain.hpp | 50 +++++
   trunk/boost/xpressive/proto/eval.hpp | 41 +++
   trunk/boost/xpressive/proto/expr.hpp | 88 +++++----
   trunk/boost/xpressive/proto/extends.hpp | 355 +++++++++++++++++++++++++--------------
   trunk/boost/xpressive/proto/generate.hpp | 2
   trunk/boost/xpressive/proto/make_expr.hpp | 2
   trunk/boost/xpressive/proto/matches.hpp | 12
   trunk/boost/xpressive/proto/operators.hpp | 8
   trunk/boost/xpressive/proto/proto_fwd.hpp | 12
   trunk/boost/xpressive/proto/ref.hpp | 2
   trunk/boost/xpressive/proto/tags.hpp | 2
   trunk/boost/xpressive/proto/traits.hpp | 10
   trunk/boost/xpressive/proto/transform/fold.hpp | 18 +
   trunk/boost/xpressive/regex_compiler.hpp | 2
   trunk/boost/xpressive/regex_primitives.hpp | 2
   trunk/libs/xpressive/proto/example/mixed.cpp | 4
   trunk/libs/xpressive/proto/test/examples.cpp | 6
   trunk/libs/xpressive/test/test_actions.cpp | 4
   trunk/libs/xpressive/test/test_assert.cpp | 2
   trunk/libs/xpressive/test/test_dynamic_grammar.cpp | 2
   trunk/libs/xpressive/test/test_skip.cpp | 2
   trunk/libs/xpressive/test/test_symbols.cpp | 22 +-
   trunk/libs/xpressive/test/test_typeof2.cpp | 12
   34 files changed, 511 insertions(+), 271 deletions(-)

Modified: trunk/boost/xpressive/basic_regex.hpp
==============================================================================
--- trunk/boost/xpressive/basic_regex.hpp (original)
+++ trunk/boost/xpressive/basic_regex.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -152,7 +152,7 @@
     /// \return A basic_regex object corresponding to the regular expression
     /// represented by the character range.
     /// \pre [begin,end) is a valid range.
- /// \pre The range of characters specified by [begin,end) contains a
+ /// \pre The range of characters specified by [begin,end) contains a
     /// valid string-based representation of a regular expression.
     /// \throw regex_error when the range of characters has invalid regular
     /// expression syntax.

Modified: trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -215,7 +215,7 @@
>::type
>::type
             temp_type;
-
+
             typedef typename temp_type::type result_type;
 
             result_type operator ()(Expr const &expr, action_context const &ctx) const

Modified: trunk/boost/xpressive/detail/core/matcher/predicate_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/predicate_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/predicate_matcher.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -122,7 +122,7 @@
         bool match(match_state<BidiIter> &state, Next const &next) const
         {
             // Predicate is check(assertion), where assertion can be
- // a lambda or a function object.
+ // a lambda or a function object.
             return this->match_(state, next, proto::matches<Predicate, AssertionFunctor>());
         }
 

Modified: trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -261,7 +261,7 @@
     struct as_optional
       : or_<
             when<IsMarkerOrRepeater, as_mark_optional<Grammar, Greedy> >
- , otherwise<as_default_optional<Grammar, Greedy> >
+ , otherwise<as_default_optional<Grammar, Greedy> >
>
     {};
 

Modified: trunk/boost/xpressive/match_results.hpp
==============================================================================
--- trunk/boost/xpressive/match_results.hpp (original)
+++ trunk/boost/xpressive/match_results.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -324,8 +324,8 @@
         return *this;
     }
 
- /// Returns one plus the number of marked sub-expressions in the regular
- /// expression that was matched if *this represents the result of a
+ /// Returns one plus the number of marked sub-expressions in the regular
+ /// expression that was matched if *this represents the result of a
     /// successful match. Otherwise returns 0.
     size_type size() const
     {

Modified: trunk/boost/xpressive/proto/context/null.hpp
==============================================================================
--- trunk/boost/xpressive/proto/context/null.hpp (original)
+++ trunk/boost/xpressive/proto/context/null.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -74,7 +74,7 @@
 
             void operator ()(Expr &expr, Context &ctx) const
             {
- BOOST_PP_REPEAT(N, BOOST_PROTO_EVAL_N, ~)
+ BOOST_PP_REPEAT(N, BOOST_PROTO_EVAL_N, ~)
             }
         };
 

Modified: trunk/boost/xpressive/proto/debug.hpp
==============================================================================
--- trunk/boost/xpressive/proto/debug.hpp (original)
+++ trunk/boost/xpressive/proto/debug.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -20,7 +20,7 @@
 #include <boost/xpressive/proto/expr.hpp>
 #include <boost/xpressive/proto/traits.hpp>
 #else
-/// INTERNAL <> ONLY
+/// INTERNAL ONLY
 /// Needed to work around doxygen bug
 struct a_dummy_global;
 #endif
@@ -60,11 +60,11 @@
             return hidden_detail_::printable_tag<Tag>::call();
         }
 
- #define BOOST_PROTO_DEFINE_TAG_NAME(Tag)\
- inline char const *proto_tag_name(tag::Tag)\
- {\
- return #Tag;\
- }\
+ #define BOOST_PROTO_DEFINE_TAG_NAME(Tag) \
+ inline char const *proto_tag_name(tag::Tag) \
+ { \
+ return #Tag; \
+ } \
         /**/
 
         BOOST_PROTO_DEFINE_TAG_NAME(posit)
@@ -117,15 +117,28 @@
 
     namespace functional
     {
- // Display a proto expression tree
+ /// \brief Pretty-print a proto expression tree.
+ ///
+ /// A PolymorphicFunctionObject which accepts a Proto expression
+ /// tree and pretty-prints it to an \c ostream for debugging
+ /// purposes.
         struct display_expr
         {
+ typedef void result_type;
+
+ /// \param depth The starting indentation depth for this node.
+ /// Children nodes will be displayed at a starting
+ /// depth of <tt>depth+4</tt>.
+ /// \param sout The \c ostream to which the expression tree
+ /// will be written.
             display_expr(int depth = 0, std::ostream &sout = std::cout)
               : depth_(depth)
               , first_(true)
               , sout_(sout)
             {}
 
+ /// \brief Pretty-print the current node in a Proto expression
+ /// tree.
             template<typename Args>
             void operator()(proto::expr<tag::terminal, Args, 0> const &expr) const
             {
@@ -139,8 +152,9 @@
             /**/
 
         #define BOOST_PP_LOCAL_MACRO(N) \
+ /** \overload */ \
             template<typename Tag, typename Args> \
- void operator()(proto::expr<Tag, Args, N> const &expr) const \
+ void operator()(proto::expr<Tag, Args, N> const &expr) const \
             { \
                 using namespace tag; \
                 this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ") \
@@ -156,6 +170,8 @@
         #include BOOST_PP_LOCAL_ITERATE()
         #undef BOOST_PROTO_ARG
 
+ /// \overload
+ ///
             template<typename T>
             void operator()(T const &t) const
             {
@@ -169,16 +185,24 @@
         };
     }
 
+ /// \brief Pretty-print a Proto expression tree.
+ ///
+ /// \note Equivalent to <tt>functional::display_expr(0, sout)(expr)</tt>
+ /// \param expr The Proto expression tree to pretty-print
+ /// \param sout The \c ostream to which the output should be
+ /// written.
     template<typename Expr>
- void display_expr(Expr const &expr)
+ void display_expr(Expr const &expr, std::ostream &sout)
     {
- functional::display_expr()(expr);
+ functional::display_expr(0, sout)(expr);
     }
 
+ /// \overload
+ ///
     template<typename Expr>
- void display_expr(Expr const &expr, std::ostream &sout)
+ void display_expr(Expr const &expr)
     {
- functional::display_expr(0, sout)(expr);
+ functional::display_expr()(expr);
     }
 
 }}

Modified: trunk/boost/xpressive/proto/deep_copy.hpp
==============================================================================
--- trunk/boost/xpressive/proto/deep_copy.hpp (original)
+++ trunk/boost/xpressive/proto/deep_copy.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -43,6 +43,14 @@
 
         namespace result_of
         {
+ /// \brief A metafunction for calculating the return type
+ /// of \c proto::deep_copy().
+ ///
+ /// A metafunction for calculating the return type
+ /// of \c proto::deep_copy(). The type parameter \c Expr
+ /// should be the type of a Proto expression tree.
+ /// It should not be a reference type, nor should it
+ /// be cv-qualified.
             template<typename Expr>
             struct deep_copy
               : detail::deep_copy_impl<Expr>
@@ -51,6 +59,16 @@
 
         namespace functional
         {
+ /// \brief A PolymorphicFunctionObject type for deep-copying
+ /// Proto expression trees.
+ ///
+ /// A PolymorphicFunctionObject type for deep-copying
+ /// Proto expression trees. When a tree is deep-copied,
+ /// all internal nodes and most terminals held by reference
+ /// are instead held by value.
+ ///
+ /// \attention Terminals of reference-to-array type and of
+ /// reference-to-function type are left unchanged.
             struct deep_copy
             {
                 BOOST_PROTO_CALLABLE()
@@ -60,7 +78,7 @@
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
- : result_of::deep_copy<typename detail::remove_cv_ref<Expr>::type>
+ : result_of::deep_copy<BOOST_PROTO_UNCVREF(Expr)>
                 {};
 
                 template<typename Expr>
@@ -72,6 +90,18 @@
             };
         }
 
+ /// \brief A PolymorphicFunctionObject for deep-copying
+ /// Proto expression trees.
+ ///
+ /// A PolymorphicFunctionObject for deep-copying
+ /// Proto expression trees. When a tree is deep-copied,
+ /// all internal nodes and most terminals held by reference
+ /// are instead held by value.
+ ///
+ /// \attention Terminals of reference-to-array type and of
+ /// reference-to-function type are left unchanged.
+ ///
+ /// \sa proto::functional::deep_copy.
         functional::deep_copy const deep_copy = {};
 
         namespace detail

Modified: trunk/boost/xpressive/proto/detail/funop.hpp
==============================================================================
--- trunk/boost/xpressive/proto/detail/funop.hpp (original)
+++ trunk/boost/xpressive/proto/detail/funop.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -10,6 +10,8 @@
 #error Do not include this file directly
 #endif
 
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
     template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A)>
     struct BOOST_PP_CAT(funop, BOOST_PP_ITERATION())
     {
@@ -38,6 +40,8 @@
         }
     };
 
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
     template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This>
     struct funop<Expr(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This>
       : BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<
@@ -50,6 +54,8 @@
>
     {};
 
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
     template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This>
     struct funop<Expr const(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This>
       : BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<

Modified: trunk/boost/xpressive/proto/detail/pop_front.hpp
==============================================================================
--- trunk/boost/xpressive/proto/detail/pop_front.hpp (original)
+++ trunk/boost/xpressive/proto/detail/pop_front.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -2,7 +2,7 @@
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2008 Eric Niebler
 
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 #ifndef BOOST_PROTO_DETAIL_FUSION_POP_FRONT_EAH_01_22_2008
@@ -20,13 +20,13 @@
         template <typename Sequence>
         struct pop_front
         {
- typedef
+ typedef
                 range<
                     typename next<
                         typename begin<Sequence>::type
>::type
                   , typename end<Sequence>::type
- >
+ >
             type;
         };
     }

Modified: trunk/boost/xpressive/proto/detail/reverse.hpp
==============================================================================
--- trunk/boost/xpressive/proto/detail/reverse.hpp (original)
+++ trunk/boost/xpressive/proto/detail/reverse.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -2,7 +2,7 @@
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2008 Eric Niebler
 
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 #ifndef BOOST_PROTO_DETAIL_FUSION_REVERSE_EAH_01_22_2008
@@ -72,7 +72,7 @@
>::type
>::type
                 type;
-
+
                 static type
                 call(Iterator const& i)
                 {
@@ -91,9 +91,9 @@
                 typedef typename next_impl<typename first_type::tag>::
                     template apply<first_type>
                 wrapped;
-
+
                 typedef reverse_view_iterator<typename wrapped::type> type;
-
+
                 static type
                 call(Iterator const& i)
                 {
@@ -112,9 +112,9 @@
                 typedef typename prior_impl<typename first_type::tag>::
                     template apply<first_type>
                 wrapped;
-
+
                 typedef reverse_view_iterator<typename wrapped::type> type;
-
+
                 static type
                 call(Iterator const& i)
                 {
@@ -146,7 +146,7 @@
             struct apply
             {
                 typedef reverse_view_iterator<typename Sequence::last_type> type;
-
+
                 static type
                 call(Sequence const& s)
                 {
@@ -162,7 +162,7 @@
             struct apply
             {
                 typedef reverse_view_iterator<typename Sequence::first_type> type;
-
+
                 static type
                 call(Sequence const& s)
                 {

Modified: trunk/boost/xpressive/proto/domain.hpp
==============================================================================
--- trunk/boost/xpressive/proto/domain.hpp (original)
+++ trunk/boost/xpressive/proto/domain.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -1,7 +1,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 /// \file domain.hpp
-/// Contains definition of domain\<\> class template, for defining domains
-/// with a grammar for controlling operator overloading.
+/// Contains definition of domain\<\> class template and helpers for
+/// defining domains with a generator and a grammar for controlling
+/// operator overloading.
 //
 // Copyright 2007 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
@@ -30,21 +31,50 @@
 
     namespace domainns_
     {
+ /// \brief For use in defining domain tags to be used
+ /// with \c proto::extends\<\>. A \e Domain associates
+ /// an expression type with a \e Generator, and optionally
+ /// a \e Grammar.
+ ///
+ /// The Generator determines how new expressions in the
+ /// domain are constructed. Typically, a generator wraps
+ /// all new expressions in a wrapper that imparts
+ /// domain-specific behaviors to expressions within its
+ /// domain. (See \c proto::extends\<\>.)
+ ///
+ /// The Grammar determines whether a given expression is
+ /// valid within the domain, and automatically disables
+ /// any operator overloads which would cause an invalid
+ /// expression to be created. By default, the Grammar
+ /// parameter defaults to the wildcard, \c proto::_, which
+ /// makes all expressions valid within the domain.
+ ///
         template<typename Generator, typename Grammar>
         struct domain
           : Generator
         {
- typedef Grammar grammar;
+ typedef Grammar proto_grammar;
 
             /// INTERNAL ONLY
             ///
             typedef void proto_is_domain_;
         };
 
+ /// \brief The domain expressions have by default, if
+ /// \c proto::extends\<\> has not been used to associate
+ /// a domain with an expression.
+ ///
         struct default_domain
           : domain<>
         {};
 
+ /// \brief A pseudo-domain for use in functions and
+ /// metafunctions that require a domain parameter. It
+ /// indicates that the domain of the parent node should
+ /// be inferred from the domains of the children nodes.
+ ///
+ /// \attention \c deduce_domain is not itself a valid domain.
+ ///
         struct deduce_domain
           : domain<detail::not_a_generator, detail::not_a_grammar>
         {};
@@ -52,22 +82,36 @@
 
     namespace result_of
     {
+ /// A metafunction that returns \c mpl::true_
+ /// if the type \c T is the type of a Prot domain;
+ /// \c mpl::false_ otherwise. If \c T inherits from
+ /// \c proto::domain\<\>, \c is_domain\<T\> is
+ /// \c mpl::true_.
         template<typename T, typename EnableIf>
         struct is_domain
           : mpl::false_
         {};
 
+ /// INTERNAL ONLY
+ ///
         template<typename T>
         struct is_domain<T, typename T::proto_is_domain_>
           : mpl::true_
         {};
 
+ /// A metafunction that returns the domain of
+ /// a given type. If \c T is a Proto expression
+ /// type, it returns that expression's associated
+ /// domain. If not, it returns
+ /// \c proto::default_domain.
         template<typename T, typename EnableIf>
         struct domain_of
         {
             typedef default_domain type;
         };
 
+ /// INTERNAL ONLY
+ ///
         template<typename T>
         struct domain_of<T, typename T::proto_is_expr_>
         {

Modified: trunk/boost/xpressive/proto/eval.hpp
==============================================================================
--- trunk/boost/xpressive/proto/eval.hpp (original)
+++ trunk/boost/xpressive/proto/eval.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -18,6 +18,13 @@
 
     namespace result_of
     {
+ /// \brief A metafunction for calculating the return type
+ /// of \c proto::eval() given a certain \c Expr and \c Context
+ /// types.
+ ///
+ /// \note The types \c Expr and \c Context should not be
+ /// reference types. They may be cv-qualified, but the
+ /// cv-qualification on the \c Context parameter is ignored.
         template<typename Expr, typename Context>
         struct eval
         {
@@ -27,19 +34,34 @@
 
     namespace functional
     {
+ /// \brief A PolymorphicFunctionObject type for
+ /// evaluating a given Proto expression with a given
+ /// context.
         struct eval
         {
+ BOOST_PROTO_CALLABLE()
+
             template<typename Sig>
             struct result {};
 
             template<typename This, typename Expr, typename Context>
             struct result<This(Expr, Context)>
- : proto::result_of::eval<
- typename remove_reference<Expr>::type
- , typename remove_reference<Context>::type
- >
- {};
-
+ {
+ typedef
+ typename proto::result_of::eval<
+ typename remove_reference<Expr>::type
+ , typename remove_reference<Context>::type
+ >::type
+ type;
+ };
+
+ /// \brief Evaluate a given Proto expression with a given
+ /// context.
+ /// \param The Proto expression to evaluate
+ /// \param The context in which the expression should be
+ /// evaluated.
+ /// \note This function is equivalent to
+ /// <tt>typename Context::template eval<Expr>()(expr, context)</tt>.
             template<typename Expr, typename Context>
             typename proto::result_of::eval<Expr, Context>::type
             operator ()(Expr &expr, Context &context) const
@@ -47,6 +69,8 @@
                 return typename Context::template eval<Expr>()(expr, context);
             }
 
+ /// \overload
+ ///
             template<typename Expr, typename Context>
             typename proto::result_of::eval<Expr, Context>::type
             operator ()(Expr &expr, Context const &context) const
@@ -56,6 +80,11 @@
         };
     }
 
+ /// \brief A PolymorphicFunctionObject for
+ /// evaluating a given Proto expression with
+ /// a given context.
+ ///
+ /// \sa proto::functional::eval.
     functional::eval const eval = {};
 }}
 

Modified: trunk/boost/xpressive/proto/expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/expr.hpp (original)
+++ trunk/boost/xpressive/proto/expr.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -41,39 +41,40 @@
 
     namespace boost { namespace proto
     {
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_ARG(z, n, data)\
- typedef typename Args::BOOST_PP_CAT(arg, n) BOOST_PP_CAT(proto_arg, n);\
- BOOST_PP_CAT(proto_arg, n) BOOST_PP_CAT(arg, n);\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_VOID(z, n, data)\
- typedef void BOOST_PP_CAT(proto_arg, n);\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_AS_OP(z, n, data)\
- proto::as_arg(BOOST_PP_CAT(a,n))\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_UNREF_ARG_TYPE(z, n, data)\
- typename result_of::unref<typename Args::BOOST_PP_CAT(arg, n)>::const_reference\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_UNREF_ARG(z, n, data)\
- proto::unref(this->BOOST_PP_CAT(arg, n))\
- /**/
 
         namespace detail
         {
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_ARG(z, n, data) \
+ typedef typename Args::BOOST_PP_CAT(arg, n) BOOST_PP_CAT(proto_arg, n); \
+ BOOST_PP_CAT(proto_arg, n) BOOST_PP_CAT(arg, n); \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_VOID(z, n, data) \
+ typedef void BOOST_PP_CAT(proto_arg, n); \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_AS_OP(z, n, data) \
+ proto::as_arg(BOOST_PP_CAT(a,n)) \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNREF_ARG_TYPE(z, n, data) \
+ typename result_of::unref<typename Args::BOOST_PP_CAT(arg, n)>::const_reference \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNREF_ARG(z, n, data) \
+ proto::unref(this->BOOST_PP_CAT(arg, n)) \
+ /**/
+
             template<typename Tag, typename Arg>
             struct address_of_hack
             {
@@ -108,6 +109,8 @@
 
         namespace result_of
         {
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
             template<typename Sig, typename This>
             struct funop;
 
@@ -117,15 +120,15 @@
 
         namespace exprns_
         {
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/expr.hpp>))
- #include BOOST_PP_ITERATE()
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/expr.hpp>))
+ #include BOOST_PP_ITERATE()
         }
 
- #undef BOOST_PROTO_ARG
- #undef BOOST_PROTO_VOID
- #undef BOOST_PROTO_AS_OP
- #undef BOOST_PROTO_UNREF_ARG_TYPE
- #undef BOOST_PROTO_UNREF_ARG
+ #undef BOOST_PROTO_ARG
+ #undef BOOST_PROTO_VOID
+ #undef BOOST_PROTO_AS_OP
+ #undef BOOST_PROTO_UNREF_ARG_TYPE
+ #undef BOOST_PROTO_UNREF_ARG
     }}
 
     #if defined(_MSC_VER) && (_MSC_VER >= 1020)
@@ -140,11 +143,11 @@
     #define IS_TERMINAL 0 == BOOST_PP_ITERATION()
 
         /// \brief Representation of a node in an expression tree.
- ///
+ ///
         /// \c proto::expr\<\> is a node in an expression template tree. It
         /// is a container for its children sub-trees. It also serves as
         /// the terminal nodes of the tree.
- ///
+ ///
         /// \c Tag is type that represents the operation encoded by
         /// this expression. It is typically one of the structs
         /// in the \c boost::proto::tag namespace, but it doesn't
@@ -154,12 +157,15 @@
         ///
         /// \c Args is a type list representing the type of the children
         /// of this expression. It is an instantiation of one
- /// of \c proto::args1\<\>, \c proto::args2\<\>, etc. The
+ /// of \c proto::args1\<\>, \c proto::args2\<\>, etc. The
         /// children types must all themselves be either \c expr\<\>
         /// or \c proto::ref_\<proto::expr\<\>\>, unless the \c Tag
         /// type is \c boost::proto::tag::terminal, in which case
- /// \c Args must be \c proto::args1\<T\>, where \c T can be any
+ /// \c Args must be \c proto::args0\<T\>, where \c T can be any
         /// type.
+ ///
+ /// \c proto::expr\<\> is a valid Fusion random-access sequence, where
+ /// the elements of the sequence are the children expressions.
         template<typename Tag, typename Args>
         struct expr<Tag, Args, BOOST_PP_ITERATION() >
         {

Modified: trunk/boost/xpressive/proto/extends.hpp
==============================================================================
--- trunk/boost/xpressive/proto/extends.hpp (original)
+++ trunk/boost/xpressive/proto/extends.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -48,173 +48,266 @@
 
     /// INTERNAL ONLY
     ///
- #define BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, Const)\
- BOOST_PP_IF(N, BOOST_PROTO_TEMPLATE_YES_, BOOST_PROTO_TEMPLATE_NO_)(Z, N)\
- typename boost::mpl::apply_wrap1<\
- BOOST_PP_TUPLE_ELEM(3, 2, Data)\
- , typename boost::proto::result_of::BOOST_PP_CAT(funop, N)<\
- BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const\
- BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A)\
- >::type\
- >::type const\
- operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::result_of::BOOST_PP_CAT(funop, N)<\
- BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const\
- BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A)\
- > funop;\
- return BOOST_PP_TUPLE_ELEM(3, 2, Data)::make(\
- funop::call(*static_cast<BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const *>(this) BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, a))\
- );\
- }\
+ #define BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, Const) \
+ BOOST_PP_IF(N, BOOST_PROTO_TEMPLATE_YES_, BOOST_PROTO_TEMPLATE_NO_)(Z, N) \
+ typename boost::mpl::apply_wrap1< \
+ BOOST_PP_TUPLE_ELEM(3, 2, Data) \
+ , typename boost::proto::result_of::BOOST_PP_CAT(funop, N)< \
+ BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const \
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A) \
+ >::type \
+ >::type const \
+ operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::result_of::BOOST_PP_CAT(funop, N)< \
+ BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const \
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A) \
+ > funop; \
+ return BOOST_PP_TUPLE_ELEM(3, 2, Data)::make( \
+ funop::call( \
+ *static_cast<BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const *>(this)\
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, a) \
+ ) \
+ ); \
+ } \
         /**/
 
     /// INTERNAL ONLY
     ///
- #define BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data) \
         BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, 1)
 
     /// INTERNAL ONLY
     ///
- #define BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data) \
         BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, 0)
 
     /// INTERNAL ONLY
     ///
- #define BOOST_PROTO_DEFINE_FUN_OP(Z, N, Data)\
- BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data)\
- BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP(Z, N, Data) \
+ BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data) \
+ BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data) \
         /**/
 
     /// INTERNAL ONLY
     ///
- #define BOOST_PROTO_EXTENDS_ARG(z, n, Expr)\
- typedef\
- typename Expr::BOOST_PP_CAT(proto_arg, n)\
- BOOST_PP_CAT(proto_arg, n);\
- /**/
-
- #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain)\
- Expr expr;\
- \
- typedef Expr proto_base_expr;\
- typedef Domain proto_domain;\
- typedef Derived proto_derived_expr;\
- typedef typename Expr::proto_tag proto_tag;\
- typedef typename Expr::proto_args proto_args;\
- typedef typename Expr::proto_arity proto_arity;\
- typedef void proto_is_expr_;\
- BOOST_PROTO_DEFINE_FUSION_TAG(boost::proto::tag::proto_expr)\
- BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_ARG, Expr)\
- \
- static Derived const make(Expr const &expr)\
- {\
- Derived that = {expr};\
- return that;\
- }\
- \
- Expr &proto_base()\
- {\
- return this->expr;\
- }\
- \
- Expr const &proto_base() const\
- {\
- return this->expr;\
- }\
+ #define BOOST_PROTO_EXTENDS_ARG(z, n, Expr) \
+ typedef \
+ typename Expr::BOOST_PP_CAT(proto_arg, n) \
+ BOOST_PP_CAT(proto_arg, n); \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain) \
+ Expr expr; \
+ \
+ typedef Expr proto_base_expr; \
+ typedef Domain proto_domain; \
+ typedef Derived proto_derived_expr; \
+ typedef typename Expr::proto_tag proto_tag; \
+ typedef typename Expr::proto_args proto_args; \
+ typedef typename Expr::proto_arity proto_arity; \
+ typedef void proto_is_expr_; \
+ BOOST_PROTO_DEFINE_FUSION_TAG(boost::proto::tag::proto_expr) \
+ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_ARG, Expr) \
+ \
+ static Derived const make(Expr const &expr) \
+ { \
+ Derived that = {expr}; \
+ return that; \
+ } \
+ \
+ Expr &proto_base() \
+ { \
+ return this->expr; \
+ } \
+ \
+ Expr const &proto_base() const \
+ { \
+ return this->expr; \
+ } \
         /**/
 
         /// INTERNAL ONLY
         ///
- #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const)\
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > >::type const\
- operator =(A &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
- \
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > >::type const\
- operator =(A const &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const) \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > \
+ >::type const \
+ operator =(A &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
+ \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > \
+ >::type const \
+ operator =(A const &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
         /**/
 
- #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain) \
         BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 1)
 
- #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain) \
         BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 0)
 
- #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain) \
         /**/
 
         /// INTERNAL ONLY
         ///
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const)\
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > >::type const\
- operator [](A &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
- \
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > >::type const\
- operator [](A const &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const) \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > \
+ >::type const \
+ operator [](A &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
+ \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > \
+ >::type const \
+ operator [](A const &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
         /**/
 
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain) \
         BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 1)
 
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain) \
         BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 0)
 
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain) \
         /**/
 
         /// INTERNAL ONLY
         ///
- #define BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- template<typename Sig>\
- struct result\
- {\
- typedef\
- typename boost::mpl::apply_wrap1<Domain, typename boost::proto::result_of::funop<Sig, Derived >::type>::type\
- type;\
- };\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP_CONST, (Expr, Derived, Domain))\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP_NON_CONST, (Expr, Derived, Domain))\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP, (Expr, Derived, Domain))\
+ #define BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ template<typename Sig> \
+ struct result \
+ { \
+ typedef \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , typename boost::proto::result_of::funop<Sig, Derived >::type \
+ >::type \
+ type; \
+ }; \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP_CONST \
+ , (Expr, Derived, Domain) \
+ ) \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP_NON_CONST \
+ , (Expr, Derived, Domain) \
+ ) \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP \
+ , (Expr, Derived, Domain) \
+ ) \
         /**/
 
     namespace exprns_
@@ -275,8 +368,8 @@
 
             /// INTERNAL ONLY
             ///
- #define BOOST_PP_LOCAL_MACRO(N) \
- BOOST_PROTO_DEFINE_FUN_OP_CONST(1, N, (Expr, Derived, Domain))\
+ #define BOOST_PP_LOCAL_MACRO(N) \
+ BOOST_PROTO_DEFINE_FUN_OP_CONST(1, N, (Expr, Derived, Domain)) \
             /**/
 
             /// INTERNAL ONLY
@@ -313,8 +406,8 @@
 
             /// INTERNAL ONLY
             ///
- #define BOOST_PP_LOCAL_MACRO(N) \
- BOOST_PROTO_DEFINE_FUN_OP(1, N, (Expr, Derived, Domain))\
+ #define BOOST_PP_LOCAL_MACRO(N) \
+ BOOST_PROTO_DEFINE_FUN_OP(1, N, (Expr, Derived, Domain)) \
             /**/
 
             /// INTERNAL ONLY

Modified: trunk/boost/xpressive/proto/generate.hpp
==============================================================================
--- trunk/boost/xpressive/proto/generate.hpp (original)
+++ trunk/boost/xpressive/proto/generate.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -29,7 +29,7 @@
             template<typename Domain, typename Expr>
             struct generate_if
               : lazy_enable_if<
- matches<Expr, typename Domain::grammar>
+ matches<Expr, typename Domain::proto_grammar>
                   , typename Domain::template apply<Expr>
>
             {};

Modified: trunk/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/make_expr.hpp (original)
+++ trunk/boost/xpressive/proto/make_expr.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -576,7 +576,7 @@
                   : result_of::unpack_expr<
                         Tag
                       , Domain
- , typename detail::remove_cv_ref<Sequence>::type
+ , BOOST_PROTO_UNCVREF(Sequence)
>
                 {};
 

Modified: trunk/boost/xpressive/proto/matches.hpp
==============================================================================
--- trunk/boost/xpressive/proto/matches.hpp (original)
+++ trunk/boost/xpressive/proto/matches.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -42,7 +42,7 @@
     // Some compilers (like GCC) need extra help figuring out a template's arity.
     // I use MPL's BOOST_MPL_AUX_LAMBDA_ARITY_PARAM() macro to disambiguate, which
     // which is controlled by the BOOST_MPL_LIMIT_METAFUNCTION_ARITY macro. If
- // You define BOOST_PROTO_MAX_ARITY to be greater than
+ // You define BOOST_PROTO_MAX_ARITY to be greater than
     // BOOST_MPL_LIMIT_METAFUNCTION_ARITY on these compilers, things don't work.
     // You must define BOOST_MPL_LIMIT_METAFUNCTION_ARITY to be greater.
     #ifdef BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
@@ -197,7 +197,7 @@
             template<
                 typename T
               , typename U
- , bool B = is_array<typename remove_cv_ref<T>::type>::value
+ , bool B = is_array<BOOST_PROTO_UNCVREF(T)>::value
>
             struct terminal_array_matches
               : mpl::false_
@@ -225,8 +225,8 @@
                     mpl::and_<
                         is_cv_ref_compatible<T, U>
                       , lambda_matches<
- typename remove_cv_ref<T>::type
- , typename remove_cv_ref<U>::type
+ BOOST_PROTO_UNCVREF(T)
+ , BOOST_PROTO_UNCVREF(U)
>
>
                   , terminal_array_matches<T, U>
@@ -239,8 +239,8 @@
               : mpl::and_<
                     is_cv_ref_compatible<T, U>
                   , lambda_matches<
- typename remove_cv_ref<T>::type
- , typename remove_cv_ref<U>::type
+ BOOST_PROTO_UNCVREF(T)
+ , BOOST_PROTO_UNCVREF(U)
>
>
             {};

Modified: trunk/boost/xpressive/proto/operators.hpp
==============================================================================
--- trunk/boost/xpressive/proto/operators.hpp (original)
+++ trunk/boost/xpressive/proto/operators.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -119,7 +119,7 @@
         template<typename Domain, typename Trait, typename Arg, typename Expr>
         struct enable_unary
           : boost::enable_if<
- boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::grammar> >
+ boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::proto_grammar> >
               , Expr
>
         {};
@@ -129,7 +129,7 @@
           : boost::enable_if<
                 boost::mpl::and_<
                     Trait
- , boost::proto::matches<Expr, typename domain_of<Arg>::type::grammar>
+ , boost::proto::matches<Expr, typename domain_of<Arg>::type::proto_grammar>
>
               , Expr
>
@@ -145,7 +145,7 @@
           : boost::enable_if<
                 boost::mpl::and_<
                     mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
- , boost::proto::matches<Expr, typename Domain::grammar>
+ , boost::proto::matches<Expr, typename Domain::proto_grammar>
>
               , Expr
>
@@ -156,7 +156,7 @@
           : boost::enable_if<
                 boost::mpl::and_<
                     mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
- , boost::proto::matches<Expr, typename deduce_domain_<typename domain_of<Arg1>::type, Arg2>::type::grammar>
+ , boost::proto::matches<Expr, typename deduce_domain_<typename domain_of<Arg1>::type, Arg2>::type::proto_grammar>
>
               , Expr
>

Modified: trunk/boost/xpressive/proto/proto_fwd.hpp
==============================================================================
--- trunk/boost/xpressive/proto/proto_fwd.hpp (original)
+++ trunk/boost/xpressive/proto/proto_fwd.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -68,10 +68,10 @@
 
         struct dont_care;
 
- template<typename T>
- struct remove_cv_ref
- : remove_const<typename remove_reference<T>::type>
- {};
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNCVREF(X) \
+ typename boost::remove_const<typename boost::remove_reference<X>::type>::type
     }
 
     ///////////////////////////////////////////////////////////////////////////////
@@ -422,6 +422,7 @@
         struct left;
         struct right;
         struct unref;
+ struct eval;
         struct deep_copy;
 
         template<typename Domain = default_domain>
@@ -447,7 +448,7 @@
 
         template<typename Tag, typename Domain = deduce_domain>
         struct unfused_expr;
-
+
         typedef make_expr<tag::terminal> make_terminal;
         typedef make_expr<tag::posit> make_posit;
         typedef make_expr<tag::negate> make_negate;
@@ -640,6 +641,7 @@
     typedef functional::flatten _flatten;
     typedef functional::pop_front _pop_front;
     typedef functional::reverse _reverse;
+ typedef functional::deep_copy _eval;
     typedef functional::deep_copy _deep_copy;
 
     template<typename T>

Modified: trunk/boost/xpressive/proto/ref.hpp
==============================================================================
--- trunk/boost/xpressive/proto/ref.hpp (original)
+++ trunk/boost/xpressive/proto/ref.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -140,7 +140,7 @@
 
             template<typename This, typename T>
             struct result<This(T)>
- : result_of::unref<typename detail::remove_cv_ref<T>::type>
+ : result_of::unref<BOOST_PROTO_UNCVREF(T)>
             {};
 
             template<typename T>

Modified: trunk/boost/xpressive/proto/tags.hpp
==============================================================================
--- trunk/boost/xpressive/proto/tags.hpp (original)
+++ trunk/boost/xpressive/proto/tags.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -20,7 +20,7 @@
     struct terminal {};
 
     /// Tag type for the unary + operator.
- struct posit {};
+ struct posit {};
 
     /// Tag type for the unary - operator.
     struct negate {};

Modified: trunk/boost/xpressive/proto/traits.hpp
==============================================================================
--- trunk/boost/xpressive/proto/traits.hpp (original)
+++ trunk/boost/xpressive/proto/traits.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -368,7 +368,7 @@
             BOOST_PROTO_BINARY_GENERATOR(bitwise_or_assign)
             BOOST_PROTO_BINARY_GENERATOR(bitwise_xor_assign)
             BOOST_PROTO_BINARY_GENERATOR(subscript)
-
+
         } // namespace op
 
         #undef BOOST_PROTO_UNARY_GENERATOR
@@ -473,7 +473,7 @@
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
- : result_of::arg_c<typename detail::remove_cv_ref<Expr>::type, N>
+ : result_of::arg_c<BOOST_PROTO_UNCVREF(Expr), N>
                 {};
 
                 template<typename Expr>
@@ -497,7 +497,7 @@
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
- : result_of::arg<typename detail::remove_cv_ref<Expr>::type, N>
+ : result_of::arg<BOOST_PROTO_UNCVREF(Expr), N>
                 {};
 
                 template<typename Expr>
@@ -520,7 +520,7 @@
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
- : result_of::left<typename detail::remove_cv_ref<Expr>::type>
+ : result_of::left<BOOST_PROTO_UNCVREF(Expr)>
                 {};
 
                 template<typename Expr>
@@ -543,7 +543,7 @@
 
                 template<typename This, typename Expr>
                 struct result<This(Expr)>
- : result_of::right<typename detail::remove_cv_ref<Expr>::type>
+ : result_of::right<BOOST_PROTO_UNCVREF(Expr)>
                 {};
 
                 template<typename Expr>

Modified: trunk/boost/xpressive/proto/transform/fold.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/fold.hpp (original)
+++ trunk/boost/xpressive/proto/transform/fold.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -50,8 +50,8 @@
                     {
                         typedef
                             typename when<_, Transform>::template result<void(
- typename proto::detail::remove_cv_ref<Expr>::type
- , typename proto::detail::remove_cv_ref<State>::type
+ BOOST_PROTO_UNCVREF(Expr)
+ , BOOST_PROTO_UNCVREF(State)
                               , Visitor
                             )>::type
                         type;
@@ -198,8 +198,11 @@
               : fold<_reverse(Sequence), State, Fun>
             {};
 
- // A fold transform that transforms the left sub-tree and
- // uses the result as state while transforming the right.
+ /// This specialization is only for improved compile-time performance
+ /// in the commom case when the Sequence transform is \c proto::_.
+ ///
+ /// INTERNAL ONLY
+ ///
             template<typename State0, typename Fun>
             struct fold<_, State0, Fun> : proto::callable
             {
@@ -239,8 +242,11 @@
                 }
             };
 
- // A reverse_fold compiler that compiles the right sub-tree and
- // uses the result as state while compiling the left.
+ /// This specialization is only for improved compile-time performance
+ /// in the commom case when the Sequence transform is \c proto::_.
+ ///
+ /// INTERNAL ONLY
+ ///
             template<typename State0, typename Fun>
             struct reverse_fold<_, State0, Fun> : proto::callable
             {

Modified: trunk/boost/xpressive/regex_compiler.hpp
==============================================================================
--- trunk/boost/xpressive/regex_compiler.hpp (original)
+++ trunk/boost/xpressive/regex_compiler.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -106,7 +106,7 @@
     /// represented by the character range.
     /// \pre InputIter is a model of the InputIterator concept.
     /// \pre [begin,end) is a valid range.
- /// \pre The range of characters specified by [begin,end) contains a
+ /// \pre The range of characters specified by [begin,end) contains a
     /// valid string-based representation of a regular expression.
     /// \throw regex_error when the range of characters has invalid regular
     /// expression syntax.

Modified: trunk/boost/xpressive/regex_primitives.hpp
==============================================================================
--- trunk/boost/xpressive/regex_primitives.hpp (original)
+++ trunk/boost/xpressive/regex_primitives.hpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -148,7 +148,7 @@
       : proto::or_<
             proto::terminal<proto::_>
           , proto::comma<proto::_, proto::_>
- , proto::subscript<proto::terminal<set_initializer>, proto::_>
+ , proto::subscript<proto::terminal<set_initializer>, proto::_>
           , proto::assign<proto::terminal<set_initializer>, proto::_>
           , proto::assign<proto::terminal<attribute_placeholder<proto::_> >, proto::_>
           , proto::complement<Primitives>

Modified: trunk/libs/xpressive/proto/example/mixed.cpp
==============================================================================
--- trunk/libs/xpressive/proto/example/mixed.cpp (original)
+++ trunk/libs/xpressive/proto/example/mixed.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -44,14 +44,14 @@
 {
     template<class Sig>
     struct result;
-
+
     template<class This, class Cont>
     struct result<This(Cont)>
       : proto::result_of::as_expr<
             iterator_wrapper<typename boost::remove_reference<Cont>::type::const_iterator>
>
     {};
-
+
     template<typename Cont>
     typename result<begin(Cont const &)>::type
     operator ()(Cont const &cont) const

Modified: trunk/libs/xpressive/proto/test/examples.cpp
==============================================================================
--- trunk/libs/xpressive/proto/test/examples.cpp (original)
+++ trunk/libs/xpressive/proto/test/examples.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -269,7 +269,7 @@
         function<terminal<make_pair_tag>, terminal<_>, terminal<_> >
       /*<< Return `std::pair<F,S>(f,s)` where `f` and `s` are the
       first and second arguments to the lazy `make_pair_()` function.
- (This uses `proto:::make<>` under the covers to evaluate the
+ (This uses `proto:::make<>` under the covers to evaluate the
       transform.)>>*/
       , std::pair<_arg(_arg1), _arg(_arg2)>(_arg(_arg1), _arg(_arg2))
>
@@ -289,7 +289,7 @@
     struct make_pair : proto::callable
     {
         template<typename Sig> struct result;
-
+
         template<typename This, typename First, typename Second>
         struct result<This(First, Second)>
         {
@@ -313,7 +313,7 @@
             function<terminal<make_pair_tag>, terminal<_>, terminal<_> >
           /*<< Return `make_pair()(f,s)` where `f` and `s` are the
           first and second arguments to the lazy `make_pair_()` function.
- (This uses `proto:::call<>` under the covers to evaluate the
+ (This uses `proto:::call<>` under the covers to evaluate the
           transform.)>>*/
           , make_pair(_arg(_arg1), _arg(_arg2))
>

Modified: trunk/libs/xpressive/test/test_actions.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_actions.cpp (original)
+++ trunk/libs/xpressive/test/test_actions.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -70,10 +70,10 @@
     std::list<int> result;
     std::string str("1 23 456 7890");
 #if BOOST_VERSION >= 103500
- sregex rx = (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]
+ sregex rx = (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]
>> *(' ' >> (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]);
 #else
- sregex rx = (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]
+ sregex rx = (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]
>> *(' ' >> (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]);
 #endif
 

Modified: trunk/libs/xpressive/test/test_assert.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_assert.cpp (original)
+++ trunk/libs/xpressive/test/test_assert.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -53,7 +53,7 @@
 
     mark_tag month(1), day(2);
     // find a valid date of the form month/day/year.
- sregex date =
+ sregex date =
         (
             // Month must be between 1 and 12 inclusive
             (month= _d >> !_d) [ check(as<int>(_) >= 1

Modified: trunk/libs/xpressive/test/test_dynamic_grammar.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_dynamic_grammar.cpp (original)
+++ trunk/libs/xpressive/test/test_dynamic_grammar.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -68,7 +68,7 @@
             compiler["factor"] = compiler.compile( "\\d+ | (? $group ) ", x);
             compiler["term"] = compiler.compile( "(? $factor ) (?: \\* (? $factor ) | / (? $factor ) )* ", x);
             compiler["expr"] = compiler.compile( "(? $term ) (?: \\+ (? $term ) | - (? $term ) )* ", x);
-
+
             expr = compiler["expr"];
         }
 

Modified: trunk/libs/xpressive/test/test_skip.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_skip.cpp (original)
+++ trunk/libs/xpressive/test/test_skip.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -25,7 +25,7 @@
              (s1= as_xpr('b')) >>
              as_xpr('b') >>
             *as_xpr('c') // causes backtracking
- ) >>
+ ) >>
         "c c";
 
     smatch what;

Modified: trunk/libs/xpressive/test/test_symbols.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_symbols.cpp (original)
+++ trunk/libs/xpressive/test/test_symbols.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -60,7 +60,7 @@
     map1["foobaz"] = "4";
     map1["foobazbaz"] = "5";
 
- sregex rx = (a1=map1)[ xp::ref(result) = a1 ]
+ sregex rx = (a1=map1)[ xp::ref(result) = a1 ]
>> *((a1=map1)[ xp::ref(result) += ',', xp::ref(result) += a1 ]);
 
     if(!regex_match(str, rx))
@@ -89,10 +89,10 @@
     map1["bop"] = 7890;
 
 #if BOOST_VERSION >= 103500
- sregex rx = (a1=map1)[ xp::ref(result)->*push_back( a1 ) ]
+ sregex rx = (a1=map1)[ xp::ref(result)->*push_back( a1 ) ]
>> *(' ' >> (a1=map1)[ xp::ref(result)->*push_back( a1 ) ]);
 #else
- sregex rx = (a1=map1)[ push_back(xp::ref(result), a1 ) ]
+ sregex rx = (a1=map1)[ push_back(xp::ref(result), a1 ) ]
>> *(' ' >> (a1=map1)[ push_back(xp::ref(result), a1 ) ]);
 #endif
 
@@ -176,15 +176,15 @@
     map8["h"] = 8;
     map9["i"] = 9;
 
- sregex rx =
+ sregex rx =
            (a1=map1)[ xp::ref(result) += a1 ]
>> (a2=map2)[ xp::ref(result) += a2 ]
- >> (a3=map3)[ xp::ref(result) += a3 ]
- >> (a4=map4)[ xp::ref(result) += a4 ]
- >> (a5=map5)[ xp::ref(result) += a5 ]
- >> (a6=map6)[ xp::ref(result) += a6 ]
- >> (a7=map7)[ xp::ref(result) += a7 ]
- >> (a8=map8)[ xp::ref(result) += a8 ]
+ >> (a3=map3)[ xp::ref(result) += a3 ]
+ >> (a4=map4)[ xp::ref(result) += a4 ]
+ >> (a5=map5)[ xp::ref(result) += a5 ]
+ >> (a6=map6)[ xp::ref(result) += a6 ]
+ >> (a7=map7)[ xp::ref(result) += a7 ]
+ >> (a8=map8)[ xp::ref(result) += a8 ]
>> (a9=map9)[ xp::ref(result) += a9 ];
 
     if(!regex_match(str, rx))
@@ -211,7 +211,7 @@
     map1["b"] = "3";
     map1["B"] = "4";
     std::string str("a A b B a A b B");
- sregex rx = icase(a1= map1) [ xp::ref(result) = a1 ]
+ sregex rx = icase(a1= map1) [ xp::ref(result) = a1 ]
>> repeat<3>( (' ' >> icase(a1= map1) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) )
>> repeat<4>( (' ' >> (a1= map1) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) );
     if(!regex_match(str, rx))

Modified: trunk/libs/xpressive/test/test_typeof2.cpp
==============================================================================
--- trunk/libs/xpressive/test/test_typeof2.cpp (original)
+++ trunk/libs/xpressive/test/test_typeof2.cpp 2008-01-28 17:56:46 EST (Mon, 28 Jan 2008)
@@ -43,13 +43,13 @@
     TYPEOF_TEST((+_w)[ xp::ref(result) += _ ] >> *(' ' >> (+_w)[ xp::ref(result) += ',' + _ ]));
     TYPEOF_TEST((+_w)[ xp::ref(result) += _ ] >> *(' ' >> (+_w)[ xp::ref(result) += ',' + _ ]) >> repeat<4>(_));
     std::list<int> result2;
- TYPEOF_TEST((+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]
+ TYPEOF_TEST((+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]
>> *(' ' >> (+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]));
     std::map<std::string, int> result3;
     TYPEOF_TEST(( (s1= +_w) >> "=>" >> (s2= +_d) )[ xp::ref(result3)[s1] = as<int>(s2) ]);
     placeholder< std::map<std::string, int> > const _map5 = {{}};
     TYPEOF_TEST(( (s1= +_w) >> "=>" >> (s2= +_d) )[ _map5[s1] = as<int>(s2) ]);
-
+
     smatch what;
     placeholder< std::map<std::string, int> > const _map6 = {{}};
     std::map<std::string, int> result6;
@@ -101,11 +101,11 @@
     std::string result;
     std::map<std::string,std::string> map10;
     TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ] >> *(' ' >> (a1=map10)[ xp::ref(result) += ',' + a1 ]));
- TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ]
+ TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ]
>> *((a1=map10)[ xp::ref(result) += ',', xp::ref(result) += a1 ]));
     std::list<int> result12;
     std::map<std::string,int> map12;
- TYPEOF_TEST((a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]
+ TYPEOF_TEST((a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]
>> *(' ' >> (a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]));
 
     placeholder< std::map<std::string, int> > const _map13 = {};
@@ -121,10 +121,10 @@
     std::map<std::string,int> map3a;
     TYPEOF_TEST((a1=map1a)[ xp::ref(result14) += a1 ]
>> (a2=map2a)[ xp::ref(result) += a2 ]
- >> (a3=map3a)[ xp::ref(result) += a3 ]
+ >> (a3=map3a)[ xp::ref(result) += a3 ]
         );
         {
- TYPEOF_TEST(icase(a1= map10) [ xp::ref(result) = a1 ]
+ TYPEOF_TEST(icase(a1= map10) [ xp::ref(result) = a1 ]
>> repeat<3>( (' ' >> icase(a1= map10) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) )
         );
     TYPEOF_TEST(*((a1= map1a) | (a1= map2a) | 'e') [ xp::ref(result) += (a1 | "9") ]);


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