|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2007-11-11 13:25:51
Author: eric_niebler
Date: 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
New Revision: 41010
URL: http://svn.boost.org/trac/boost/changeset/41010
Log:
clean-up
Text files modified:
branches/proto/v3/boost/xpressive/proto3/expr.hpp | 1 -
branches/proto/v3/boost/xpressive/proto3/make_expr.hpp | 26 ++++++++++++++++++--------
branches/proto/v3/boost/xpressive/proto3/operators.hpp | 9 +++++++++
branches/proto/v3/boost/xpressive/proto3/proto_fwd.hpp | 9 +++------
branches/proto/v3/boost/xpressive/proto3/transform/case.hpp | 13 ++-----------
5 files changed, 32 insertions(+), 26 deletions(-)
Modified: branches/proto/v3/boost/xpressive/proto3/expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto3/expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto3/expr.hpp 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
@@ -45,7 +45,6 @@
template<typename... A>
static expr make(A &&... a)
{
-
expr that = {{a...}};
return that;
}
Modified: branches/proto/v3/boost/xpressive/proto3/make_expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto3/make_expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto3/make_expr.hpp 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
@@ -277,7 +277,10 @@
struct fold_domain_
{
- template<typename Sig> struct result {};
+ template<typename Sig>
+ struct result
+ {};
+
template<typename This, typename Domain, typename State>
struct result<This(Domain, State)>
: mpl::if_<
@@ -290,7 +293,10 @@
struct domain_of_
{
- template<typename Sig> struct result {};
+ template<typename Sig>
+ struct result
+ {};
+
template<typename This, typename Domain>
struct result<This(Domain)>
: domain_of<UNCVREF(Domain)>
@@ -299,7 +305,10 @@
struct make_args_fun
{
- template<typename Sig> struct result {};
+ template<typename Sig>
+ struct result
+ {};
+
template<typename This, typename... Args>
struct result<This(Args...)>
{
@@ -459,6 +468,11 @@
struct result
{};
+ template<typename This, typename... A>
+ struct result<This(A...)>
+ : result_of::make_expr<Tag, Domain, A...>
+ {};
+
template<typename... A>
typename result_of::make_expr<Tag, Domain, A...>::type const
operator ()(A &&...a) const
@@ -476,11 +490,7 @@
template<typename This, typename Sequence>
struct result<This(Sequence)>
- : result_of::unpack_expr<
- Tag
- , Domain
- , UNCVREF(Sequence)
- >
+ : result_of::unpack_expr<Tag, Domain, UNCVREF(Sequence)>
{};
template<typename Sequence>
Modified: branches/proto/v3/boost/xpressive/proto3/operators.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto3/operators.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto3/operators.hpp 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
@@ -13,6 +13,7 @@
#include <boost/utility/enable_if.hpp>
#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/xpressive/proto3/proto_fwd.hpp>
+#include <boost/xpressive/proto3/make_expr.hpp>
#define UNREF(X) typename remove_reference<X>::type
@@ -173,7 +174,15 @@
#undef BOOST_PROTO_DEFINE_UNARY_OPERATOR
#undef BOOST_PROTO_DEFINE_BINARY_OPERATOR
+ template<typename A, typename B, typename C>
+ typename result_of::make_expr<tag::if_else_, A, B, C>::type
+ if_else(A &&a, B &&b, C &&c)
+ {
+ return result_of::make_expr<tag::if_else_, A, B, C>::call(a, b, c);
+ }
}
+
+ using exprns_::if_else;
}}
Modified: branches/proto/v3/boost/xpressive/proto3/proto_fwd.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto3/proto_fwd.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto3/proto_fwd.hpp 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
@@ -199,6 +199,7 @@
using result_of::tag_of;
using result_of::is_domain;
using result_of::domain_of;
+ using result_of::is_expr;
template<long N, typename Expr>
typename result_of::arg_c<Expr, N>::reference
@@ -362,16 +363,12 @@
template<typename Grammar, typename Fun = Grammar>
struct case_;
- template<typename Trans>
- struct typeof_;
-
struct _expr;
struct _state;
struct _visitor;
}
using transform::case_;
- using transform::typeof_;
using transform::_expr;
using transform::_state;
using transform::_visitor;
@@ -407,8 +404,8 @@
struct callable_eval;
}
- //using context::null_context;
- //using context::null_eval;
+ using context::null_context;
+ using context::null_eval;
using context::default_context;
using context::default_eval;
using context::callable_context;
Modified: branches/proto/v3/boost/xpressive/proto3/transform/case.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto3/transform/case.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto3/transform/case.hpp 2007-11-11 13:25:50 EST (Sun, 11 Nov 2007)
@@ -10,8 +10,10 @@
#define BOOST_PROTO3_TRANSFORM_CASE_HPP_EAN_10_29_2007
#include <boost/mpl/bool.hpp>
+#include <boost/mpl/logical.hpp>
#include <boost/mpl/aux_/has_type.hpp>
#include <boost/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
#include <boost/xpressive/proto3/proto_fwd.hpp>
#include <boost/xpressive/proto3/transform/bind.hpp>
#include <boost/xpressive/proto3/transform/apply.hpp>
@@ -232,11 +234,6 @@
}
};
- //template<typename Trans>
- //struct typeof_
- // : case_<_, Trans>
- //{};
-
}
namespace detail
@@ -283,12 +280,6 @@
typedef no_transform type;
};
- template<typename Trans>
- struct transform_category<typeof_<Trans> >
- {
- typedef raw_transform type;
- };
-
}}
#endif
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