|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-01-21 15:39:38
Author: eric_niebler
Date: 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
New Revision: 42906
URL: http://svn.boost.org/trac/boost/changeset/42906
Log:
minor clean-up
Text files modified:
trunk/boost/xpressive/detail/core/matcher/action_matcher.hpp | 67 ++++++++++-------
trunk/boost/xpressive/detail/static/transforms/as_action.hpp | 105 +++++++++++++++-------------
trunk/boost/xpressive/detail/static/transforms/as_alternate.hpp | 18 +---
trunk/boost/xpressive/detail/static/transforms/as_independent.hpp | 25 ++----
trunk/boost/xpressive/detail/static/transforms/as_inverse.hpp | 2
trunk/boost/xpressive/detail/static/transforms/as_marker.hpp | 22 +++--
trunk/boost/xpressive/detail/static/transforms/as_matcher.hpp | 5
trunk/boost/xpressive/detail/static/transforms/as_modifier.hpp | 5
trunk/boost/xpressive/detail/static/transforms/as_quantifier.hpp | 113 ++++++++++++++----------------
trunk/boost/xpressive/detail/static/transforms/as_sequence.hpp | 13 ---
trunk/boost/xpressive/detail/static/transforms/as_set.hpp | 16 ---
trunk/boost/xpressive/proto/deep_copy.hpp | 4
trunk/boost/xpressive/proto/eval.hpp | 2
trunk/boost/xpressive/proto/expr.hpp | 1
trunk/boost/xpressive/proto/extends.hpp | 1
trunk/boost/xpressive/proto/fusion.hpp | 10 +-
trunk/boost/xpressive/proto/matches.hpp | 82 +++++++++++++++-------
trunk/boost/xpressive/proto/operators.hpp | 4
trunk/boost/xpressive/proto/proto_fwd.hpp | 31 -------
trunk/boost/xpressive/proto/ref.hpp | 2
trunk/boost/xpressive/proto/traits.hpp | 29 +++++--
trunk/boost/xpressive/proto/transform/arg.hpp | 25 +++---
trunk/boost/xpressive/proto/transform/bind.hpp | 30 +++----
trunk/boost/xpressive/proto/transform/call.hpp | 144 +++++++++++++++++++++++++---------------
trunk/boost/xpressive/proto/transform/fold.hpp | 125 +++++++++++++++++++++------------
trunk/boost/xpressive/proto/transform/fold_tree.hpp | 31 +++++---
trunk/boost/xpressive/proto/transform/make.hpp | 39 ++++++----
trunk/boost/xpressive/proto/transform/pass_through.hpp | 44 ++++++++----
trunk/boost/xpressive/proto/transform/when.hpp | 29 ++++---
trunk/boost/xpressive/regex_primitives.hpp | 41 ++++++-----
30 files changed, 578 insertions(+), 487 deletions(-)
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-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -265,13 +265,14 @@
//
struct subreg_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<sub_match<typename State::iterator> >
- {};
+ {
+ typedef State unref_state;
+ typedef typename proto::terminal<sub_match<typename unref_state::iterator> >::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -287,13 +288,16 @@
//
struct mark_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<sub_match<typename State::iterator> >
- {};
+ {
+ typedef State unref_state;
+ typedef
+ typename proto::terminal<sub_match<typename unref_state::iterator> >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -331,15 +335,17 @@
//
struct attr_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<
- opt<typename Expr::proto_arg0::matcher_type::value_type::second_type>
- >
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ opt<typename Expr::proto_arg0::matcher_type::value_type::second_type>
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -356,18 +362,20 @@
// attr_with_default_transform
//
template<typename Grammar, typename Callable = proto::callable>
- struct attr_with_default_transform
+ struct attr_with_default_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::unary_expr<
- attr_with_default_tag
- , typename Grammar::template result<void(Expr, State, Visitor)>::type
- >
- {};
+ {
+ typedef
+ typename proto::unary_expr<
+ attr_with_default_tag
+ , typename Grammar::template result<void(Expr, State, Visitor)>::type
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -385,19 +393,22 @@
//
struct by_ref_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<typename proto::result_of::arg<Expr>::const_reference>
- {};
+ {
+ typedef
+ typename proto::terminal<typename proto::result_of::arg<Expr>::const_reference>::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &) const
{
- return result<void(Expr, State, Visitor)>::type::make(proto::arg(expr));
+ typedef typename result<void(Expr, State, Visitor)>::type that_type;
+ return that_type::make(proto::arg(expr));
}
};
@@ -439,7 +450,7 @@
{
// Bind the arguments
int sub = this->sub_; // BUGBUG this is a hack
- typedef typename BindActionArgs::result<void(Actor, match_state<BidiIter>, int)>::type action_type;
+ typedef typename BindActionArgs::template result<void(Actor, match_state<BidiIter>, int)>::type action_type;
action<action_type> actor(BindActionArgs()(this->actor_, state, sub));
// Put the action in the action list
Modified: trunk/boost/xpressive/detail/static/transforms/as_action.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_action.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_action.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -62,21 +62,26 @@
// For patterns like (a1 = RHS)[ref(i) = a1], transform to
// (a1 = RHS)[ref(i) = read_attr<1, RHS>] so that when reading the attribute
// we know what type is stored in the attribute slot.
- struct as_read_attr : callable
+ struct as_read_attr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<
- detail::read_attr<
- typename Expr::proto_arg0::nbr_type
- , typename FindAttr<typename Expr::proto_arg0::nbr_type>
- ::template result<void(State, mpl::void_, int)>::type
- >
- >
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ detail::read_attr<
+ typename Expr::proto_arg0::nbr_type
+ , typename FindAttr<typename Expr::proto_arg0::nbr_type>::template result<void(
+ State
+ , mpl::void_
+ , int
+ )>::type
+ >
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -90,15 +95,19 @@
///////////////////////////////////////////////////////////////////////////////
// by_value
// Store all terminals within an action by value to avoid dangling references.
- struct by_value : callable
+ struct by_value : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<typename proto::result_of::arg<Expr>::type>
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ typename proto::result_of::arg<Expr>::type
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -123,15 +132,15 @@
///////////////////////////////////////////////////////////////////////////////
// attr_nbr
// For an attribute placeholder, return the attribute's slot number.
- struct attr_nbr : callable
+ struct attr_nbr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : Expr::proto_arg0::nbr_type
- {};
+ {
+ typedef typename Expr::proto_arg0::nbr_type::type type;
+ };
};
struct max_attr;
@@ -152,24 +161,23 @@
///////////////////////////////////////////////////////////////////////////////
// max_attr
// Take the maximum of the current attr slot number and the state.
- struct max_attr : callable
+ struct max_attr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::max<State, typename MaxAttr::result<void(Expr, State, Visitor)>::type>
- {};
+ {
+ typedef typename mpl::max<State, typename MaxAttr::template result<void(Expr, State, Visitor)>::type >::type type;
+ };
};
///////////////////////////////////////////////////////////////////////////////
// as_attr_matcher
// turn a1=matcher into attr_matcher<Matcher>(1)
- struct as_attr_matcher : callable
+ struct as_attr_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -198,29 +206,31 @@
///////////////////////////////////////////////////////////////////////////////
// add_attrs
// Wrap an expression in attr_begin_matcher/attr_end_matcher pair
- struct add_attrs : callable
+ struct add_attrs : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- typename terminal<
- detail::attr_begin_matcher<typename MaxAttr::result<void(Expr, mpl::int_<0>, int)>::type>
- >::type
- , typename shift_right<
- Expr
- , terminal<detail::attr_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ typename terminal<
+ detail::attr_begin_matcher<typename MaxAttr::template result<void(Expr, mpl::int_<0>, int)>::type >
+ >::type
+ , typename shift_right<
+ Expr
+ , terminal<detail::attr_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &) const
{
- detail::attr_begin_matcher<typename MaxAttr::result<void(Expr, mpl::int_<0>, int)>::type> begin;
+ detail::attr_begin_matcher<typename MaxAttr::template result<void(Expr, mpl::int_<0>, int)>::type > begin;
detail::attr_end_matcher end;
typename result<void(Expr, State, Visitor)>::type that = {{begin}, {expr, {end}}};
return that;
@@ -245,20 +255,19 @@
// If A and B use attributes, wrap the above expression in
// a attr_begin_matcher<Count> / attr_end_matcher pair, where Count is
// the number of attribute slots used by the pattern/action.
- struct as_action : callable
+ struct as_action : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
{
typedef typename proto::result_of::left<Expr>::type expr_type;
typedef typename proto::result_of::right<Expr>::type action_type;
- typedef typename DeepCopy::result<void(action_type, expr_type, int)>::type action_copy_type;
+ typedef typename DeepCopy::template result<void(action_type, expr_type, int)>::type action_copy_type;
typedef
- typename InsertMark::result<void(expr_type, State, Visitor)>::type
+ typename InsertMark::template result<void(expr_type, State, Visitor)>::type
marked_expr_type;
typedef
@@ -277,7 +286,7 @@
no_attr_type;
typedef
- typename InsertAttrs::result<void(no_attr_type, State, Visitor)>::type
+ typename InsertAttrs::template result<void(no_attr_type, State, Visitor)>::type
type;
};
Modified: trunk/boost/xpressive/detail/static/transforms/as_alternate.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_alternate.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_alternate.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -22,10 +22,6 @@
#include <boost/xpressive/detail/core/matcher/alternate_matcher.hpp>
#include <boost/xpressive/detail/utility/cons.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive
{
namespace detail
@@ -66,10 +62,9 @@
///////////////////////////////////////////////////////////////////////////////
// in_alternate_list
template<typename Grammar>
- struct in_alternate_list : callable
+ struct in_alternate_list : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -94,10 +89,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_alternate_matcher
template<typename Grammar>
- struct as_alternate_matcher : callable
+ struct as_alternate_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -122,8 +116,4 @@
}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: trunk/boost/xpressive/detail/static/transforms/as_independent.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_independent.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_independent.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -35,10 +35,9 @@
{
template<typename Grammar>
- struct as_lookahead : callable
+ struct as_lookahead : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -61,28 +60,23 @@
};
template<typename Grammar>
- struct as_lookbehind : callable
+ struct as_lookbehind : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
{
typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef detail::lookbehind_matcher<
- typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type
- > type;
+ typedef typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type xpr_type;
+ typedef detail::lookbehind_matcher<xpr_type> type;
};
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef
- typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type
- xpr_type;
+ typedef typename result<void(Expr, State, Visitor)>::xpr_type xpr_type;
xpr_type const &expr2 = Grammar()(proto::arg(expr), detail::true_xpression(), visitor);
std::size_t width = expr2.get_width().value();
return detail::lookbehind_matcher<xpr_type>(expr2, width, false);
@@ -90,10 +84,9 @@
};
template<typename Grammar>
- struct as_keeper : callable
+ struct as_keeper : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
Modified: trunk/boost/xpressive/detail/static/transforms/as_inverse.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_inverse.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_inverse.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -68,7 +68,7 @@
}
};
- struct as_inverse : callable
+ struct as_inverse : proto::callable
{
template<typename Sig>
struct result;
Modified: trunk/boost/xpressive/detail/static/transforms/as_marker.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_marker.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_marker.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -23,21 +23,23 @@
///////////////////////////////////////////////////////////////////////////////
// as_marker
// Insert mark tags before and after the expression
- struct as_marker : callable
+ struct as_marker : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::mark_begin_matcher>::type
- , typename shift_right<
- typename proto::result_of::right<Expr>::type
- , terminal<detail::mark_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ terminal<detail::mark_begin_matcher>::type
+ , typename shift_right<
+ typename proto::result_of::right<Expr>::type
+ , terminal<detail::mark_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
Modified: trunk/boost/xpressive/detail/static/transforms/as_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_matcher.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -19,10 +19,9 @@
namespace boost { namespace xpressive { namespace grammar_detail
{
- struct as_matcher : callable
+ struct as_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
Modified: trunk/boost/xpressive/detail/static/transforms/as_modifier.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_modifier.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_modifier.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -37,10 +37,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_modifier
template<typename Grammar>
- struct as_modifier : callable
+ struct as_modifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
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-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -19,13 +19,6 @@
#include <boost/xpressive/detail/static/static.hpp>
#include <boost/xpressive/proto/proto.hpp>
-#define CV(x) typename add_const<x>::type
-#define REF(x) typename add_reference<x>::type
-#define CVREF(x) REF(CV(x))
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace detail
{
///////////////////////////////////////////////////////////////////////////////
@@ -71,10 +64,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_simple_quantifier
template<typename Grammar, typename Greedy>
- struct as_simple_quantifier : callable
+ struct as_simple_quantifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -89,9 +81,10 @@
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type xpr_type;
- typedef detail::simple_repeat_matcher<xpr_type, Greedy> matcher_type;
+ typedef result<void(Expr, State, Visitor)> result_;
+ typedef typename result_::arg_type arg_type;
+ typedef typename result_::xpr_type xpr_type;
+ typedef typename result_::matcher_type matcher_type;
typedef typename Expr::proto_tag tag;
xpr_type const &xpr = Grammar()(proto::arg(expr), detail::true_xpression(), visitor);
@@ -102,21 +95,23 @@
///////////////////////////////////////////////////////////////////////////////
// add_hidden_mark
- struct add_hidden_mark : callable
+ struct add_hidden_mark : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::mark_begin_matcher>::type
- , typename shift_right<
- Expr
- , terminal<detail::mark_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ terminal<detail::mark_begin_matcher>::type
+ , typename shift_right<
+ Expr
+ , terminal<detail::mark_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -145,29 +140,34 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_quantifier_impl
template<typename Greedy, uint_t Min, uint_t Max>
- struct as_default_quantifier_impl : callable
+ struct as_default_quantifier_impl : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::repeat_begin_matcher>::type
- , typename shift_right<
- typename InsertMark::template result<void(typename proto::result_of::arg<Expr>::type, State, Visitor)>::type
- , typename terminal<detail::repeat_end_matcher<Greedy> >::type
+ {
+ typedef
+ typename InsertMark::template result<void(typename proto::result_of::arg<Expr>::type, State, Visitor)>::type
+ marked_sub_type;
+
+ typedef
+ typename shift_right<
+ terminal<detail::repeat_begin_matcher>::type
+ , typename shift_right<
+ marked_sub_type
+ , typename terminal<detail::repeat_end_matcher<Greedy> >::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
// Ensure this sub-expression is book-ended with mark matchers
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typename InsertMark::template result<void(arg_type, State, Visitor)>::type const &
+ typename result<void(Expr, State, Visitor)>::marked_sub_type const &
marked_sub = InsertMark()(proto::arg(expr), state, visitor);
// Get the mark_number from the begin_mark_matcher
@@ -195,10 +195,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_optional
template<typename Grammar, typename Greedy>
- struct as_default_optional : callable
+ struct as_default_optional : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -222,10 +221,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_mark_optional
template<typename Grammar, typename Greedy>
- struct as_mark_optional : callable
+ struct as_mark_optional : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -270,15 +268,15 @@
///////////////////////////////////////////////////////////////////////////////
// make_optional_
template<typename Greedy>
- struct make_optional_ : callable
+ struct make_optional_ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : unary_expr<optional_tag<Greedy>, Expr>
- {};
+ {
+ typedef typename unary_expr<optional_tag<Greedy>, Expr>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename unary_expr<optional_tag<Greedy>, Expr>::type
@@ -306,21 +304,23 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_quantifier
template<typename Greedy>
- struct as_default_quantifier : callable
+ struct as_default_quantifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : boost::result_of<
+ {
+ typedef
as_default_quantifier_impl<
Greedy
, min_type<typename Expr::proto_tag>::value
, max_type<typename Expr::proto_tag>::value
- >(Expr, State, Visitor)
- >
- {};
+ >
+ impl;
+
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -336,11 +336,4 @@
}}}
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: trunk/boost/xpressive/detail/static/transforms/as_sequence.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_sequence.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_sequence.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -18,17 +18,12 @@
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/static/static.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace grammar_detail
{
template<typename Grammar>
- struct in_sequence : callable
+ struct in_sequence : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -52,8 +47,4 @@
}}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: trunk/boost/xpressive/detail/static/transforms/as_set.hpp
==============================================================================
--- trunk/boost/xpressive/detail/static/transforms/as_set.hpp (original)
+++ trunk/boost/xpressive/detail/static/transforms/as_set.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -20,10 +20,6 @@
#include <boost/xpressive/detail/utility/chset/chset.hpp>
#include <boost/xpressive/detail/utility/traits_utils.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace grammar_detail
{
@@ -76,8 +72,7 @@
template<typename Char>
struct as_list_set_matcher
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -175,10 +170,9 @@
///////////////////////////////////////////////////////////////////////////////
//
template<typename Grammar>
- struct as_set_matcher
+ struct as_set_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -214,8 +208,4 @@
}}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
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-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -53,8 +53,10 @@
{
struct deep_copy
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
Modified: trunk/boost/xpressive/proto/eval.hpp
==============================================================================
--- trunk/boost/xpressive/proto/eval.hpp (original)
+++ trunk/boost/xpressive/proto/eval.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -30,7 +30,7 @@
struct eval
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr, typename Context>
struct result<This(Expr, Context)>
Modified: trunk/boost/xpressive/proto/expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/expr.hpp (original)
+++ trunk/boost/xpressive/proto/expr.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -172,7 +172,6 @@
typedef void proto_is_expr_;
typedef expr proto_derived_expr;
- //BOOST_PROTO_IDENTITY_TRANSFORM();
BOOST_PP_REPEAT(ARG_COUNT, BOOST_PROTO_ARG, ~)
BOOST_PP_REPEAT_FROM_TO(ARG_COUNT, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_VOID, ~)
Modified: trunk/boost/xpressive/proto/extends.hpp
==============================================================================
--- trunk/boost/xpressive/proto/extends.hpp (original)
+++ trunk/boost/xpressive/proto/extends.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -106,7 +106,6 @@
typedef void proto_is_expr_;\
typedef boost::proto::tag::proto_expr fusion_tag;\
\
- BOOST_PROTO_IDENTITY_TRANSFORM();\
BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_ARG, Expr)\
\
static Derived const make(Expr const &expr)\
Modified: trunk/boost/xpressive/proto/fusion.hpp
==============================================================================
--- trunk/boost/xpressive/proto/fusion.hpp (original)
+++ trunk/boost/xpressive/proto/fusion.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -78,7 +78,7 @@
struct flatten
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -96,7 +96,7 @@
struct pop_front
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -114,7 +114,7 @@
struct reverse
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -156,7 +156,7 @@
{}
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -411,7 +411,7 @@
struct as_element
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
Modified: trunk/boost/xpressive/proto/matches.hpp
==============================================================================
--- trunk/boost/xpressive/proto/matches.hpp (original)
+++ trunk/boost/xpressive/proto/matches.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -400,11 +400,23 @@
namespace wildcardns_
{
- struct _
- : has_identity_transform
+ struct _ : proto::callable
{
- BOOST_PROTO_CALLABLE()
typedef _ proto_base_expr;
+
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
};
}
@@ -412,30 +424,46 @@
{
// not_
template<typename Grammar>
- struct not_
- : has_identity_transform
+ struct not_ : proto::callable
{
- BOOST_PROTO_CALLABLE()
typedef not_ proto_base_expr;
+
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
};
// if_
template<typename If, typename Then, typename Else>
- struct if_ : callable
+ struct if_ : proto::callable
{
typedef if_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::eval_if<
- typename when<_, If>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Then>::template result<void(Expr, State, Visitor)>
- , typename when<_, Else>::template result<void(Expr, State, Visitor)>
- >
- {};
+ {
+ typedef
+ typename mpl::if_<
+ typename when<_, If>::template result<void(Expr, State, Visitor)>::type
+ , when<_, Then>
+ , when<_, Else>
+ >::type
+ branch;
+
+ typedef typename branch::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -455,12 +483,11 @@
// or_
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
- struct or_ : callable
+ struct or_ : proto::callable
{
typedef or_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -480,12 +507,11 @@
// and_
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
- struct and_ : callable
+ struct and_ : proto::callable
{
typedef and_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -505,23 +531,25 @@
// switch_
template<typename Cases>
- struct switch_ : callable
+ struct switch_ : proto::callable
{
typedef switch_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : Cases::template case_<typename Expr::proto_tag>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename Cases::template case_<typename Expr::proto_tag> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return typename Cases::template case_<typename Expr::proto_tag>()(expr, state, visitor);
+ typedef typename Cases::template case_<typename Expr::proto_tag> impl;
+ return impl()(expr, state, visitor);
}
};
Modified: trunk/boost/xpressive/proto/operators.hpp
==============================================================================
--- trunk/boost/xpressive/proto/operators.hpp (original)
+++ trunk/boost/xpressive/proto/operators.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -179,7 +179,7 @@
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr> > > \
+ , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr> > > \
>::type const \
operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
@@ -190,7 +190,7 @@
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr const> > > \
+ , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr const> > > \
>::type const \
operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
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-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -15,10 +15,11 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
#include <boost/mpl/long.hpp>
-#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#ifndef BOOST_PROTO_MAX_ARITY
@@ -56,7 +57,7 @@
template<typename T>
struct remove_cv_ref
- : remove_cv<typename remove_reference<T>::type>
+ : remove_const<typename remove_reference<T>::type>
{};
}
@@ -628,32 +629,6 @@
typedef functional::reverse _reverse;
typedef functional::deep_copy _deep_copy;
-#define BOOST_PROTO_IDENTITY_TRANSFORM() \
- template<typename Expr_, typename State_, typename Visitor_> \
- Expr_ const &operator ()(Expr_ const &expr_, State_ const &, Visitor_ &) const \
- { \
- return expr_; \
- } \
- \
- template<typename Sig> \
- struct result; \
- \
- template<typename This, typename Expr_, typename State_, typename Visitor_> \
- struct result<This(Expr_,State_,Visitor_)> \
- { \
- typedef Expr_ type; \
- }
-
- namespace has_transformns_
- {
- struct has_identity_transform
- {
- BOOST_PROTO_IDENTITY_TRANSFORM();
- };
- }
-
- using has_transformns_::has_identity_transform;
-
template<typename T>
struct is_callable;
Modified: trunk/boost/xpressive/proto/ref.hpp
==============================================================================
--- trunk/boost/xpressive/proto/ref.hpp (original)
+++ trunk/boost/xpressive/proto/ref.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -137,7 +137,7 @@
struct unref
{
template<typename T>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
Modified: trunk/boost/xpressive/proto/traits.hpp
==============================================================================
--- trunk/boost/xpressive/proto/traits.hpp (original)
+++ trunk/boost/xpressive/proto/traits.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -241,9 +241,22 @@
{
// terminal
template<typename T>
- struct terminal : has_identity_transform
+ struct terminal
{
- BOOST_PROTO_NOT_CALLABLE()
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
+
typedef proto::expr<proto::tag::terminal, args0<T> > type;
typedef type proto_base_expr;
typedef proto::tag::terminal proto_tag;
@@ -388,7 +401,7 @@
struct as_expr
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
@@ -430,7 +443,7 @@
struct as_arg
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
@@ -456,7 +469,7 @@
struct arg_c
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -480,7 +493,7 @@
struct arg
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -503,7 +516,7 @@
struct left
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
@@ -526,7 +539,7 @@
struct right
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
Modified: trunk/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/arg.hpp (original)
+++ trunk/boost/xpressive/proto/transform/arg.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -20,10 +20,9 @@
namespace transform
{
- struct expr : callable
+ struct expr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -39,10 +38,9 @@
}
};
- struct state : callable
+ struct state : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -58,10 +56,9 @@
}
};
- struct visitor : callable
+ struct visitor : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -78,15 +75,15 @@
};
template<int I>
- struct arg_c : callable
+ struct arg_c : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::arg_c<Expr, I>
- {};
+ {
+ typedef typename proto::result_of::arg_c<Expr, I>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename proto::result_of::arg_c<Expr, I>::type
Modified: trunk/boost/xpressive/proto/transform/bind.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/bind.hpp (original)
+++ trunk/boost/xpressive/proto/transform/bind.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -25,25 +25,22 @@
namespace transform
{
template<typename Fun>
- struct bind : callable
+ struct bind : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : call<
- typename make<Fun>::template result<void(Expr, State, Visitor)>::type
- >::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef call<typename make<Fun>::template result<void(Expr, State, Visitor)>::type> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return call<
- typename make<Fun>::template result<void(Expr, State, Visitor)>::type
- >()(expr, state, visitor);
+ return call<typename make<Fun>::template result<void(Expr, State, Visitor)>::type>()(expr, state, visitor);
}
};
@@ -66,17 +63,16 @@
#define N BOOST_PP_ITERATION()
template<typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct bind<Return(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct bind<Return(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : call<
- typename make<Return>::template result<void(Expr, State, Visitor)>::type(BOOST_PP_ENUM_PARAMS(N, A))
- >::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef call<typename make<Return>::template result<void(Expr, State, Visitor)>::type(BOOST_PP_ENUM_PARAMS(N, A))> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
Modified: trunk/boost/xpressive/proto/transform/call.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/call.hpp (original)
+++ trunk/boost/xpressive/proto/transform/call.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -184,50 +184,72 @@
};
template<typename Fun>
- struct call<Fun()> : callable
+ struct call<Fun()> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call0<
- Fun
- , Expr
- , State
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call0<
+ Fun
+ , Expr
+ , State
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(expr, state, visitor);
+ typedef
+ detail::call0<
+ Fun
+ , Expr
+ , State
+ , Visitor
+ >
+ impl;
+
+ return impl::call(expr, state, visitor);
}
};
template<typename Fun, typename Arg0>
- struct call<Fun(Arg0)> : callable
+ struct call<Fun(Arg0)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call1<
- Fun
- , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , State
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call1<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , State
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::call1<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , State
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
detail::as_lvalue(when<_, Arg0>()(expr, state, visitor))
, state
, visitor
@@ -236,26 +258,37 @@
};
template<typename Fun, typename Arg0, typename Arg1>
- struct call<Fun(Arg0, Arg1)> : callable
+ struct call<Fun(Arg0, Arg1)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call2<
- Fun
- , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call2<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::call2<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
detail::as_lvalue(when<_, Arg0>()(expr, state, visitor))
, detail::as_lvalue(when<_, Arg1>()(expr, state, visitor))
, visitor
@@ -264,22 +297,23 @@
};
template<typename Fun, typename Arg0, typename Arg1, typename Arg2>
- struct call<Fun(Arg0, Arg1, Arg2)> : callable
+ struct call<Fun(Arg0, Arg1, Arg2)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- // TODO can I avoid boost::result_of here
- : boost::result_of<
- Fun(
- typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg2>::template result<void(Expr, State, Visitor)>::type
- )
- >
- {};
+ {
+ typedef
+ typename boost::result_of<
+ Fun(
+ typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg2>::template result<void(Expr, State, Visitor)>::type
+ )
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -314,19 +348,21 @@
#define N BOOST_PP_ITERATION()
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct call<Fun(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct call<Fun(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : boost::result_of<
- #define TMP(Z, M, DATA) typename when<_, BOOST_PP_CAT(A, M)>::template result<void(Expr, State, Visitor)>::type
- Fun(BOOST_PP_ENUM(N, TMP, ~))
- #undef TMP
- >
- {};
+ {
+ typedef
+ typename boost::result_of<
+ #define TMP(Z, M, DATA) typename when<_, BOOST_PP_CAT(A, M)>::template result<void(Expr, State, Visitor)>::type
+ Fun(BOOST_PP_ENUM(N, TMP, ~))
+ #undef TMP
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
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-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -39,30 +39,31 @@
: v_(v)
{}
- typedef when<_, Transform> Tfx;
-
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State>
struct result<This(Expr, State)>
- : Tfx::template result<void(typename proto::detail::remove_cv_ref<Expr>::type
- , typename proto::detail::remove_cv_ref<State>::type
- , Visitor)>
- {};
+ {
+ typedef
+ typename when<_, Transform>::template result<void(
+ typename proto::detail::remove_cv_ref<Expr>::type
+ , typename proto::detail::remove_cv_ref<State>::type
+ , Visitor
+ )>::type
+ type;
+ };
template<typename Expr, typename State>
- typename Tfx::template result<void(Expr, State, Visitor)>::type
+ typename when<_, Transform>::template result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state) const
{
- return Tfx()(expr, state, this->v_);
+ return when<_, Transform>()(expr, state, this->v_);
}
private:
Visitor &v_;
};
-
template<typename Fun, typename Expr, typename State, typename Visitor, long Arity = Expr::proto_arity::value>
struct fold_impl
{};
@@ -76,8 +77,12 @@
/**/
#define BOOST_PROTO_FOLD_STATE_TYPE(z, n, data)\
- typedef typename when<_, Fun>::template\
- result<void(typename Expr::BOOST_PROTO_ARG_N_TYPE(n)::proto_base_expr, BOOST_PP_CAT(state, n), Visitor)>::type\
+ typedef\
+ typename when<_, Fun>::template result<void(\
+ typename Expr::BOOST_PROTO_ARG_N_TYPE(n)::proto_base_expr\
+ , BOOST_PP_CAT(state, n)\
+ , Visitor\
+ )>::type\
BOOST_PP_CAT(state, BOOST_PP_INC(n));\
/**/
@@ -87,8 +92,12 @@
/**/
#define BOOST_PROTO_REVERSE_FOLD_STATE_TYPE(z, n, data)\
- typedef typename when<_, Fun>::template\
- result<void(typename Expr::BOOST_PROTO_ARG_N_TYPE(BOOST_PP_SUB(data, BOOST_PP_INC(n)))::proto_base_expr, BOOST_PP_CAT(state, BOOST_PP_SUB(data, n)), Visitor)>::type\
+ typedef\
+ typename when<_, Fun>::template result<void(\
+ typename Expr::BOOST_PROTO_ARG_N_TYPE(BOOST_PP_SUB(data, BOOST_PP_INC(n)))::proto_base_expr\
+ , BOOST_PP_CAT(state, BOOST_PP_SUB(data, n))\
+ , Visitor\
+ )>::type\
BOOST_PP_CAT(state, BOOST_PP_SUB(data, BOOST_PP_INC(n)));\
/**/
@@ -109,19 +118,21 @@
} // namespace detail
template<typename Sequence, typename State0, typename Fun>
- struct fold : callable
+ struct fold : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : fusion::result_of::fold<
- typename when<_, Sequence>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , detail::as_callable<Fun, Visitor>
- >
- {};
+ {
+ typedef
+ typename fusion::result_of::fold<
+ typename when<_, Sequence>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , detail::as_callable<Fun, Visitor>
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -144,26 +155,37 @@
// A fold transform that transforms the left sub-tree and
// uses the result as state while transforming the right.
template<typename State0, typename Fun>
- struct fold<_, State0, Fun> : callable
+ struct fold<_, State0, Fun> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::fold_impl<
- Fun
- , typename Expr::proto_base_expr
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
expr.proto_base()
, when<_, State0>()(expr, state, visitor)
, visitor
@@ -174,26 +196,37 @@
// A reverse_fold compiler that compiles the right sub-tree and
// uses the result as state while compiling the left.
template<typename State0, typename Fun>
- struct reverse_fold<_, State0, Fun> : callable
+ struct reverse_fold<_, State0, Fun> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::reverse_fold_impl<
- Fun
- , typename Expr::proto_base_expr
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::reverse_fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::reverse_fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
expr.proto_base()
, when<_, State0>()(expr, state, visitor)
, visitor
Modified: trunk/boost/xpressive/proto/transform/fold_tree.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/fold_tree.hpp (original)
+++ trunk/boost/xpressive/proto/transform/fold_tree.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -24,10 +24,9 @@
namespace detail
{
template<typename Tag>
- struct is_tag : callable
+ struct is_tag : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -48,10 +47,9 @@
template<typename Sequence, typename State0, typename Fun>
struct fold_tree
- : callable
+ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -66,20 +64,24 @@
};
template<typename Expr, typename State, typename Visitor>
- typename result<fold_tree(Expr const &, State const &, Visitor &)>::type
+ typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename result<void(Expr, State, Visitor)>::impl impl;
+ typedef fold<
+ Sequence
+ , State0
+ , detail::fold_tree_<typename Expr::proto_tag, Fun>
+ > impl;
+
return impl()(expr, state, visitor);
}
};
template<typename Sequence, typename State0, typename Fun>
struct reverse_fold_tree
- : callable
+ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -97,7 +99,12 @@
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename result<void(Expr, State, Visitor)>::impl impl;
+ typedef reverse_fold<
+ Sequence
+ , State0
+ , detail::reverse_fold_tree_<typename Expr::proto_tag, Fun>
+ > impl;
+
return impl()(expr, state, visitor);
}
};
Modified: trunk/boost/xpressive/proto/transform/make.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/make.hpp (original)
+++ trunk/boost/xpressive/proto/transform/make.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -166,15 +166,15 @@
}
template<typename Fun>
- struct make : callable
+ struct make : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::make_<Fun, Expr, State, Visitor>
- {};
+ {
+ typedef typename detail::make_<Fun, Expr, State, Visitor>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -243,8 +243,9 @@
, typename Expr, typename State, typename Visitor
>
struct make_if_<R(BOOST_PP_ENUM_PARAMS(N, A)), Expr, State, Visitor, false>
- : when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>::type type;
+ };
template<
typename R
@@ -252,8 +253,9 @@
, typename Expr, typename State, typename Visitor
>
struct make_if_<R(*)(BOOST_PP_ENUM_PARAMS(N, A)), Expr, State, Visitor, false>
- : when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename T, typename A>
struct construct_<proto::expr<T, A, N>, true>
@@ -269,15 +271,15 @@
}
template<typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct make<Return(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct make<Return(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::make_<Return, Expr, State, Visitor>
- {};
+ {
+ typedef typename detail::make_<Return, Expr, State, Visitor>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -295,10 +297,13 @@
#if BOOST_WORKAROUND(__GNUC__, == 3)
// work around GCC bug
template<typename Tag, typename Args, long Arity BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))>
+ : proto::callable
{
- template<typename Sig>
- struct result
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
{
typedef proto::expr<Tag, Args, Arity> type;
};
Modified: trunk/boost/xpressive/proto/transform/pass_through.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/pass_through.hpp (original)
+++ trunk/boost/xpressive/proto/transform/pass_through.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -27,9 +27,11 @@
struct pass_through_impl {};
#define BOOST_PROTO_DEFINE_TRANSFORM_TYPE(z, n, data)\
- typename Grammar::BOOST_PP_CAT(proto_arg, n)\
- ::template result<void(typename Expr::BOOST_PP_CAT(proto_arg, n)::proto_base_expr, State, Visitor)>\
- ::type
+ typename Grammar::BOOST_PP_CAT(proto_arg, n)::template result<void(\
+ typename Expr::BOOST_PP_CAT(proto_arg, n)::proto_base_expr\
+ , State\
+ , Visitor\
+ )>::type
#define BOOST_PROTO_DEFINE_TRANSFORM(z, n, data)\
typename Grammar::BOOST_PP_CAT(proto_arg, n)()(\
@@ -55,27 +57,39 @@
} // namespace detail
template<typename Grammar>
- struct pass_through : callable
+ struct pass_through : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : transform::detail::pass_through_impl<
- Grammar
- , typename Expr::proto_base_expr
- , State
- , Visitor
- , Expr::proto_arity::value
- >
- {};
+ {
+ typedef
+ typename transform::detail::pass_through_impl<
+ Grammar
+ , typename Expr::proto_base_expr
+ , State
+ , Visitor
+ , Expr::proto_arity::value
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(expr.proto_base(), state, visitor);
+ typedef
+ transform::detail::pass_through_impl<
+ Grammar
+ , typename Expr::proto_base_expr
+ , State
+ , Visitor
+ , Expr::proto_arity::value
+ >
+ impl;
+
+ return impl::call(expr.proto_base(), state, visitor);
}
};
Modified: trunk/boost/xpressive/proto/transform/when.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/when.hpp (original)
+++ trunk/boost/xpressive/proto/transform/when.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -56,31 +56,36 @@
template<typename Grammar, typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct when<Grammar, Return(BOOST_PP_ENUM_PARAMS(N, A))>
- : callable
+ : proto::callable
{
- typedef Return when_function_type_(BOOST_PP_ENUM_PARAMS(N, A));
typedef typename Grammar::proto_base_expr proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::if_<
- is_callable<Return>
- , call<when_function_type_> // "Return" is a function to call
- , make<when_function_type_> // "Return" is an object to construct
- >::type::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef
+ typename mpl::if_<
+ is_callable<Return>
+ , call<Return(BOOST_PP_ENUM_PARAMS(N, A))> // "Return" is a function to call
+ , make<Return(BOOST_PP_ENUM_PARAMS(N, A))> // "Return" is an object to construct
+ >::type
+ impl;
+
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
+ /// Function call operator
+ ///
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
return typename mpl::if_<
is_callable<Return>
- , call<when_function_type_>
- , make<when_function_type_>
+ , call<Return(BOOST_PP_ENUM_PARAMS(N, A))>
+ , make<Return(BOOST_PP_ENUM_PARAMS(N, A))>
>::type()(expr, state, visitor);
}
};
Modified: trunk/boost/xpressive/regex_primitives.hpp
==============================================================================
--- trunk/boost/xpressive/regex_primitives.hpp (original)
+++ trunk/boost/xpressive/regex_primitives.hpp 2008-01-21 15:39:35 EST (Mon, 21 Jan 2008)
@@ -118,19 +118,21 @@
// replace "Expr" with "keep(*State) >> Expr"
struct skip_primitives : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::shift_right<
- typename proto::unary_expr<
- keeper_tag
- , typename proto::dereference<State>::type
+ {
+ typedef
+ typename proto::shift_right<
+ typename proto::unary_expr<
+ keeper_tag
+ , typename proto::dereference<State>::type
+ >::type
+ , Expr
>::type
- , Expr
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -178,15 +180,18 @@
template<typename This, typename Expr>
struct result<This(Expr)>
- : proto::shift_right<
- typename SkipGrammar::result<void(
- typename proto::result_of::as_expr<Expr>::type
- , skip_type
- , mpl::void_
- )>::type
- , typename proto::dereference<skip_type>::type
- >
- {};
+ {
+ typedef
+ typename proto::shift_right<
+ typename SkipGrammar::result<void(
+ typename proto::result_of::as_expr<Expr>::type
+ , skip_type
+ , mpl::void_
+ )>::type
+ , typename proto::dereference<skip_type>::type
+ >::type
+ type;
+ };
template<typename Expr>
typename result<skip_directive(Expr)>::type
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