Update of /cvsroot/boost/boost/boost/xpressive/proto
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27152/proto
Modified Files:
basic_expr.hpp matches.hpp
Log Message:
fix matches<> to not instantiate intermediate basic_expr types, preliminary
proto meta-grammar for static xpressive
Index: basic_expr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/basic_expr.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- basic_expr.hpp 10 Nov 2006 04:09:38 -0000 1.8
+++ basic_expr.hpp 13 Nov 2006 15:53:45 -0000 1.9
@@ -79,7 +79,6 @@
typedef Args args_type;
typedef mpl::long_<BOOST_PP_ITERATION()> arity;
typedef proto_expr_tag fusion_tag;
- typedef void is_boost_proto_basic_expr_;
typedef void is_boost_proto_expr_;
BOOST_PP_REPEAT(BOOST_PP_ITERATION(), BOOST_PROTO_ARG, _)
Index: matches.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/matches.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- matches.hpp 7 Nov 2006 14:46:50 -0000 1.11
+++ matches.hpp 13 Nov 2006 15:53:45 -0000 1.12
@@ -14,6 +14,7 @@
#include <boost/config.hpp>
#include <boost/mpl/if.hpp>
+ #include <boost/mpl/at.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/apply.hpp>
@@ -33,6 +34,18 @@
namespace detail
{
+ template<typename T>
+ struct safe_unref
+ {
+ typedef T type;
+ };
+
+ template<typename T>
+ struct safe_unref<ref<T> >
+ {
+ typedef T type;
+ };
+
// and_
template<bool B,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename P, void)>
struct and_impl
@@ -111,8 +124,8 @@
// matches_impl
#define BOOST_PROTO_MATCHES_N_FUN(z, n, data)\
matches<\
- typename meta::arg_c< basic_expr<Tag, Args1, data >, n >::type\
- , typename meta::arg_c< basic_expr<Tag, Args2, data >, n >::type\
+ typename safe_unref<typename mpl::at_c<Args1, n>::type>::type\
+ , typename safe_unref<typename mpl::at_c<Args2, n>::type>::type\
>\
/**/
@@ -131,14 +144,17 @@
template<typename Tag, typename Args1, typename Args2>
struct matches_impl< basic_expr<Tag, Args1, 1>, basic_expr<Tag,
Args2, 1> >
- : BOOST_PROTO_MATCHES_N_FUN(1, 0, 1)
+ : matches<
+ typename safe_unref<typename mpl::at_c<Args1,
0>::type>::type
+ , typename safe_unref<typename mpl::at_c<Args2,
0>::type>::type
+ >
{};
template<typename Args1, typename Args2>
struct matches_impl< basic_expr<terminal_tag, Args1, 1>,
basic_expr<terminal_tag, Args2, 1> >
: terminal_matches<
- typename meta::arg< basic_expr<terminal_tag, Args1, 1>
>::type
- , typename meta::arg< basic_expr<terminal_tag, Args2, 1>
>::type
+ typename safe_unref<typename mpl::at_c<Args1,
0>::type>::type
+ , typename safe_unref<typename mpl::at_c<Args2,
0>::type>::type
>
{};
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs