Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58850 - in trunk: boost/spirit/home/qi/detail libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-01-09 13:52:59


Author: hkaiser
Date: 2010-01-09 13:52:59 EST (Sat, 09 Jan 2010)
New Revision: 58850
URL: http://svn.boost.org/trac/boost/changeset/58850

Log:
Spirit: reverting change to Qi sequence attribute handling
Text files modified:
   trunk/boost/spirit/home/qi/detail/pass_container.hpp | 12 +++++-------
   trunk/libs/spirit/test/qi/sequence.cpp | 22 +++++++++++-----------
   2 files changed, 16 insertions(+), 18 deletions(-)

Modified: trunk/boost/spirit/home/qi/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/pass_container.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/pass_container.hpp 2010-01-09 13:52:59 EST (Sat, 09 Jan 2010)
@@ -17,7 +17,6 @@
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/mpl/bool.hpp>
-#include <boost/mpl/and.hpp>
 
 namespace boost { namespace spirit { namespace qi { namespace detail
 {
@@ -100,12 +99,11 @@
         template <typename Component>
         bool dispatch_attribute(Component const& component, mpl::true_) const
         {
- typedef typename traits::attribute_of<
- Component, context_type, iterator_type>::type attribute_type;
-
- typedef mpl::and_<
- traits::is_container<attribute_type>
- , is_convertible<attribute_type, Attr> > predicate;
+ typedef traits::is_container<
+ typename traits::attribute_of<
+ Component, context_type, iterator_type
+ >::type
+ > predicate;
 
             return dispatch_attribute_element(component, predicate());
         }

Modified: trunk/libs/spirit/test/qi/sequence.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/sequence.cpp (original)
+++ trunk/libs/spirit/test/qi/sequence.cpp 2010-01-09 13:52:59 EST (Sat, 09 Jan 2010)
@@ -169,17 +169,17 @@
 // BOOST_TEST(v[2] == "abc3");
 // }
 
- {
- std::vector<std::string> v;
- rule<char const*, std::string()> e = *~char_(',');
- rule<char const*, std::vector<std::string>()> l = e >> *(',' >> e);
-
- BOOST_TEST(test_attr("abc1,abc2,abc3", l, v));
- BOOST_TEST(v.size() == 3);
- BOOST_TEST(v[0] == "abc1");
- BOOST_TEST(v[1] == "abc2");
- BOOST_TEST(v[2] == "abc3");
- }
+// {
+// std::vector<std::string> v;
+// rule<char const*, std::string()> e = *~char_(',');
+// rule<char const*, std::vector<std::string>()> l = e >> *(',' >> e);
+//
+// BOOST_TEST(test_attr("abc1,abc2,abc3", l, v));
+// BOOST_TEST(v.size() == 3);
+// BOOST_TEST(v[0] == "abc1");
+// BOOST_TEST(v[1] == "abc2");
+// BOOST_TEST(v[2] == "abc3");
+// }
 
     {
         std::vector<char> v;


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