Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2007-11-29 09:44:35


Author: hkaiser
Date: 2007-11-29 09:44:34 EST (Thu, 29 Nov 2007)
New Revision: 41462
URL: http://svn.boost.org/trac/boost/changeset/41462

Log:
Fixing compilation of Spirit test tree_to_xml for gcc.
Text files modified:
   trunk/boost/spirit/tree/impl/tree_to_xml.ipp | 3 ++-
   trunk/libs/spirit/test/tree_to_xml.cpp | 8 ++++----
   2 files changed, 6 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/tree/impl/tree_to_xml.ipp
==============================================================================
--- trunk/boost/spirit/tree/impl/tree_to_xml.ipp (original)
+++ trunk/boost/spirit/tree/impl/tree_to_xml.ipp 2007-11-29 09:44:34 EST (Thu, 29 Nov 2007)
@@ -14,6 +14,7 @@
 #include <cstdio>
 #include <cstdarg>
 #include <locale>
+#include <string>
 
 #include <map>
 #include <iostream>
@@ -58,7 +59,7 @@
             typedef std::ctype<wchar_t> ctype_t;
             return std::use_facet<ctype_t>(std::locale()).widen(c);
         }
- static std::wstring get(char const* source = "")
+ static std::basic_string<wchar_t> get(char const* source = "")
         {
             typedef std::ctype<wchar_t> ctype_t;
             

Modified: trunk/libs/spirit/test/tree_to_xml.cpp
==============================================================================
--- trunk/libs/spirit/test/tree_to_xml.cpp (original)
+++ trunk/libs/spirit/test/tree_to_xml.cpp 2007-11-29 09:44:34 EST (Thu, 29 Nov 2007)
@@ -131,19 +131,19 @@
 
 bool test(wchar_t const *text)
 {
- typedef std::wstring::iterator iterator_t;
+ typedef std::basic_string<wchar_t>::iterator iterator_t;
     typedef tree_match<iterator_t> parse_tree_match_t;
     typedef parse_tree_match_t::tree_iterator iter_t;
 
- std::wstring input(text);
+ std::basic_string<wchar_t> input(text);
     calculator calc;
     tree_parse_info<iterator_t> ast_info =
         ast_parse(iterator_t(input.begin()), iterator_t(input.end()),
             calc >> end_p, space_p);
 
- std::wstring out;
+ std::basic_string<wchar_t> out;
     {
- typedef container_device<std::wstring> device_type;
+ typedef container_device<std::basic_string<wchar_t> > device_type;
         boost::iostreams::stream<device_type> outsink(out);
         basic_tree_to_xml<wchar_t>(outsink, ast_info.trees, input);
     }


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