Update of /cvsroot/boost/boost/boost/xpressive/detail/static/transforms
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18239/boost/xpressive/detail/static/transforms
Modified Files:
as_set.hpp transform.hpp
Log Message:
new rules for matching terminals, less fuzzy, avoid is_convertible, add
convertible_to<> helper
Index: as_set.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/xpressive/detail/static/transforms/as_set.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- as_set.hpp 6 Apr 2007 02:07:11 -0000 1.2
+++ as_set.hpp 12 Apr 2007 23:44:41 -0000 1.3
@@ -33,10 +33,28 @@
{};
};
+ ///////////////////////////////////////////////////////////////////////////
+ // CharLiteral
+ template<typename Char>
+ struct CharLiteral
+ : proto::or_<
+ proto::terminal<char>
+ , proto::terminal<Char>
+ >
+ {};
+
+ template<>
+ struct CharLiteral<char>
+ : proto::terminal<char>
+ {};
+
+ ///////////////////////////////////////////////////////////////////////////
+ // SetSize
+ template<typename Char>
struct SetSize
: proto::or_<
- increment<proto::trans::left<proto::comma<SetSize,
proto::terminal<char> > > >
- , proto::trans::always<proto::assign<set_initializer_type,
proto::terminal<char> >, mpl::int_<1> >
+ increment<proto::trans::left<proto::comma<SetSize<Char>,
CharLiteral<Char> > > >
+ , proto::trans::always<proto::assign<set_initializer_type,
CharLiteral<Char> >, mpl::int_<1> >
>
{};
@@ -73,7 +91,7 @@
{
typedef set_matcher<
typename Visitor::traits_type
- , SetSize::apply<Expr, State, Visitor>::type::value
+ , SetSize<typename Visitor::char_type>::template apply<Expr,
State, Visitor>::type::value
> type;
};
@@ -81,10 +99,11 @@
static typename apply<Expr, State, Visitor>::type
call(Expr const &expr, State const &state, Visitor &visitor)
{
+ typedef typename Visitor::char_type char_type;
typename apply<Expr, State, Visitor>::type set(visitor.traits());
- SetFillContext<typename Visitor::char_type> ctx(set.set_);
+ SetFillContext<char_type> ctx(set.set_);
proto::eval(expr, ctx);
- int const size = SetSize::apply<Expr, State, Visitor>::type::value;
+ int const size = SetSize<char_type>::template apply<Expr, State,
Visitor>::type::value;
for(int i = 0; i < size; ++i)
{
set.set_[i] = visitor.traits().translate(set.set_[i]);
Index: transform.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/xpressive/detail/static/transforms/transform.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- transform.hpp 11 Apr 2007 16:24:32 -0000 1.13
+++ transform.hpp 12 Apr 2007 23:44:41 -0000 1.14
@@ -40,17 +40,7 @@
///////////////////////////////////////////////////////////////////////////
// CharLiteral
template<typename Char>
- struct CharLiteral
- : proto::or_<
- proto::terminal<char>
- , proto::terminal<Char>
- >
- {};
-
- template<>
- struct CharLiteral<char>
- : proto::terminal<char>
- {};
+ struct CharLiteral;
///////////////////////////////////////////////////////////////////////////
// ListSet
-------------------------------------------------------------------------
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