Update of /cvsroot/boost/boost/boost/xpressive/proto
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17614/proto
Modified Files:
domain.hpp operators.hpp
Log Message:
small fixed for BOOST_PROTO_DEFINE_OPERATORS macro
Index: domain.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/domain.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- domain.hpp 26 Jun 2007 17:03:00 -0000 1.6
+++ domain.hpp 29 Jun 2007 07:49:33 -0000 1.7
@@ -19,6 +19,15 @@
namespace boost { namespace proto
{
+ namespace detail
+ {
+ struct not_a_generator
+ {};
+
+ struct not_a_grammar
+ {};
+ }
+
template<typename Generator, typename Grammar>
struct domain
: Generator
@@ -35,7 +44,7 @@
{};
struct deduce_domain
- : domain<>
+ : domain<detail::not_a_generator, detail::not_a_grammar>
{};
template<typename T, typename EnableIf>
Index: operators.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/proto/operators.hpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- operators.hpp 26 Jun 2007 17:03:00 -0000 1.36
+++ operators.hpp 29 Jun 2007 07:49:33 -0000 1.37
@@ -123,6 +123,22 @@
>
{};
+ template<typename Trait, typename Arg, typename Expr>
+ struct enable_unary<deduce_domain, Trait, Arg, Expr>
+ : boost::enable_if<
+ boost::mpl::and_<
+ Trait
+ , boost::proto::matches<Expr, typename
domain_of<Arg>::type::grammar>
+ >
+ , Expr
+ >
+ {};
+
+ template<typename Trait, typename Arg, typename Expr>
+ struct enable_unary<default_domain, Trait, Arg, Expr>
+ : boost::enable_if<Trait, Expr>
+ {};
+
template<typename Domain, typename Trait1, typename Arg1, typename
Trait2, typename Arg2, typename Expr>
struct enable_binary
: boost::enable_if<
@@ -134,6 +150,25 @@
>
{};
+ template<typename Trait1, typename Arg1, typename Trait2, typename
Arg2, typename Expr>
+ struct enable_binary<deduce_domain, Trait1, Arg1, Trait2, Arg2, Expr>
+ : 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>
+ >
+ , Expr
+ >
+ {};
+
+ template<typename Trait1, typename Arg1, typename Trait2, typename
Arg2, typename Expr>
+ struct enable_binary<default_domain, Trait1, Arg1, Trait2, Arg2, Expr>
+ : boost::enable_if_c<
+ (3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2,
Trait2>::value))
+ , Expr
+ >
+ {};
+
} // detail
#define BOOST_PROTO_UNARY_OP_IS_POSTFIX_0
@@ -359,7 +394,7 @@
#ifndef BOOST_PROTO_DOXYGEN_INVOKED
namespace exops
{
- BOOST_PROTO_DEFINE_OPERATORS(is_extension, deduce_domain)
+ BOOST_PROTO_DEFINE_OPERATORS(is_extension, default_domain)
using proto::if_else;
}
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs