Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-07-11 13:11:40


Author: hkaiser
Date: 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
New Revision: 47317
URL: http://svn.boost.org/trac/boost/changeset/47317

Log:
Spirit: Fixing some of the regressions in Karma
Text files modified:
   branches/release/boost/spirit/home/karma/auxiliary/eol.hpp | 1 +
   branches/release/boost/spirit/home/karma/binary/padding.hpp | 2 ++
   branches/release/boost/spirit/home/karma/operator/detail/alternative.hpp | 19 +++++++------------
   branches/release/boost/spirit/home/support/detail/hold_any.hpp | 2 +-
   branches/release/libs/spirit/example/karma/actions.cpp | 2 +-
   branches/release/libs/spirit/test/karma/actions.cpp | 2 +-
   branches/release/libs/spirit/test/karma/test.hpp | 8 ++++++++
   7 files changed, 21 insertions(+), 15 deletions(-)

Modified: branches/release/boost/spirit/home/karma/auxiliary/eol.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/auxiliary/eol.hpp (original)
+++ branches/release/boost/spirit/home/karma/auxiliary/eol.hpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -9,6 +9,7 @@
 #include <boost/spirit/home/karma/domain.hpp>
 #include <boost/spirit/home/karma/delimit.hpp>
 #include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/karma/detail/generate_to.hpp>
 
 namespace boost { namespace spirit { namespace karma
 {

Modified: branches/release/boost/spirit/home/karma/binary/padding.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/binary/padding.hpp (original)
+++ branches/release/boost/spirit/home/karma/binary/padding.hpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -6,6 +6,8 @@
 #if !defined(BOOST_SPIRIT_KARMA_PADDING_MAY_06_2008_0436PM)
 #define BOOST_SPIRIT_KARMA_PADDING_MAY_06_2008_0436PM
 
+#include <boost/lexical_cast.hpp>
+
 #include <boost/spirit/home/karma/domain.hpp>
 #include <boost/spirit/home/karma/delimit.hpp>
 #include <boost/spirit/home/support/unused.hpp>

Modified: branches/release/boost/spirit/home/karma/operator/detail/alternative.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/operator/detail/alternative.hpp (original)
+++ branches/release/boost/spirit/home/karma/operator/detail/alternative.hpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -41,16 +41,11 @@
         typedef typename mpl::begin<types>::type begin;
 
         typedef typename
- mpl::find_if<
- types,
- is_convertible<mpl::_1, Expected>
- >::type
+ mpl::find_if<types, is_same<mpl::_1, Expected> >::type
         iter;
 
         typedef typename mpl::not_<is_same<iter, end> >::type type;
         enum { value = type::value };
-
-
     };
 
     template <typename Expected>
@@ -117,18 +112,18 @@
     {
         // If this alternative is a sequence, we wrap the attribute into a
         // fusion sequence.
- template <typename Parameter>
- static fusion::vector<Parameter const&>
- wrap_attribute(Parameter const& param, mpl::true_)
+ template <typename Parameter_>
+ static fusion::vector<Parameter_ const&>
+ wrap_attribute(Parameter_ const& param, mpl::true_)
         {
             return fusion::vector<Parameter const&>(param);
         }
 
         // If this alternative is not a sequence the parameter is passed
         // through unchanged.
- template <typename Parameter>
- static Parameter const&
- wrap_attribute(Parameter const& param, mpl::false_)
+ template <typename Parameter_>
+ static Parameter_ const&
+ wrap_attribute(Parameter_ const& param, mpl::false_)
         {
             return param;
         }

Modified: branches/release/boost/spirit/home/support/detail/hold_any.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/hold_any.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/hold_any.hpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -43,7 +43,7 @@
           : from(src.name()), to(dest.name())
         {}
 
- virtual const char* what() throw() { return "bad any cast"; }
+ virtual const char* what() const throw() { return "bad any cast"; }
 
         const char* from;
         const char* to;

Modified: branches/release/libs/spirit/example/karma/actions.cpp
==============================================================================
--- branches/release/libs/spirit/example/karma/actions.cpp (original)
+++ branches/release/libs/spirit/example/karma/actions.cpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -12,7 +12,7 @@
 #include <boost/bind.hpp>
 
 #include <iostream>
-#include <strstream>
+#include <sstream>
 
 // Presented are various ways to attach semantic actions
 // * Using plain function pointer

Modified: branches/release/libs/spirit/test/karma/actions.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/actions.cpp (original)
+++ branches/release/libs/spirit/test/karma/actions.cpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -14,7 +14,7 @@
 #include <boost/bind.hpp>
 #include <boost/function_output_iterator.hpp>
 
-#include <strstream>
+#include <sstream>
 #include "test.hpp"
 
 using namespace spirit_test;

Modified: branches/release/libs/spirit/test/karma/test.hpp
==============================================================================
--- branches/release/libs/spirit/test/karma/test.hpp (original)
+++ branches/release/libs/spirit/test/karma/test.hpp 2008-07-11 13:11:38 EDT (Fri, 11 Jul 2008)
@@ -36,6 +36,14 @@
     display_type const display = {};
 
     ///////////////////////////////////////////////////////////////////////////
+ template <typename Char>
+ struct output_iterator
+ {
+ typedef std::basic_string<Char> string_type;
+ typedef std::back_insert_iterator<string_type> type;
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
     template <typename Char, typename Generator>
     inline bool test(Char const *expected, Generator const& g)
     {


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