Update of /cvsroot/boost/boost/boost/xpressive/detail/core/matcher
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12267/boost/xpressive/detail/core/matcher
Modified Files:
action_matcher.hpp
Log Message:
make eval() a free function, make xpressive deep_copy semantic actions
Index: action_matcher.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/xpressive/detail/core/matcher/action_matcher.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- action_matcher.hpp 28 Mar 2007 08:35:56 -0000 1.13
+++ action_matcher.hpp 29 Mar 2007 22:19:38 -0000 1.14
@@ -40,6 +40,25 @@
{};
template<typename Expr>
+ struct eval<Expr, proto::tag::terminal>
+ {
+ typedef
+ typename add_reference<
+ typename unwrap_reference<
+ typename remove_reference<
+ typename proto::default_eval<Expr,
action_context>::result_type
+ >::type
+ >::type
+ >::type
+ result_type;
+
+ result_type operator()(Expr &expr, action_context &ctx) const
+ {
+ return proto::default_eval<Expr, action_context>()(expr, ctx);
+ }
+ };
+
+ template<typename Expr>
struct eval<Expr, proto::tag::mem_ptr>
{
typedef typename proto::result_of::right<Expr>::type right_type;
@@ -64,7 +83,7 @@
typename fusion::result_of::invoke<function_type,
evaluated_args>::type
result_type;
- result_type operator()(Expr const &expr, action_context &ctx) const
+ result_type operator()(Expr &expr, action_context &ctx) const
{
return fusion::invoke<function_type>(
proto::arg(proto::arg_c<0>(proto::right(expr)))
@@ -93,7 +112,7 @@
virtual void execute() const
{
action_context ctx;
- this->actor_.eval(ctx);
+ proto::eval(this->actor_, ctx);
}
private:
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs