Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61604 - trunk/boost/property_tree
From: sebastian.redl_at_[hidden]
Date: 2010-04-27 04:49:27


Author: cornedbee
Date: 2010-04-27 04:49:25 EDT (Tue, 27 Apr 2010)
New Revision: 61604
URL: http://svn.boost.org/trac/boost/changeset/61604

Log:
Fix property tree for systems without wstring. Fixes bug 4145
Text files modified:
   trunk/boost/property_tree/ptree_fwd.hpp | 8 ++++----
   trunk/boost/property_tree/string_path.hpp | 2 ++
   2 files changed, 6 insertions(+), 4 deletions(-)

Modified: trunk/boost/property_tree/ptree_fwd.hpp
==============================================================================
--- trunk/boost/property_tree/ptree_fwd.hpp (original)
+++ trunk/boost/property_tree/ptree_fwd.hpp 2010-04-27 04:49:25 EDT (Tue, 27 Apr 2010)
@@ -88,9 +88,6 @@
     /** Implements a path using a std::string as the key. */
     typedef string_path<std::string, id_translator<std::string> > path;
 
- /** Implements a path using a std::wstring as the key. */
- typedef string_path<std::wstring, id_translator<std::wstring> > wpath;
-
     /**
      * A property tree with std::string for key and data, and default
      * comparison.
@@ -105,7 +102,10 @@
                         detail::less_nocase<std::string> >
         iptree;
 
-#ifndef BOOST_NO_CWCHAR
+#ifndef BOOST_NO_STD_WSTRING
+ /** Implements a path using a std::wstring as the key. */
+ typedef string_path<std::wstring, id_translator<std::wstring> > wpath;
+
     /**
      * A property tree with std::wstring for key and data, and default
      * comparison.

Modified: trunk/boost/property_tree/string_path.hpp
==============================================================================
--- trunk/boost/property_tree/string_path.hpp (original)
+++ trunk/boost/property_tree/string_path.hpp 2010-04-27 04:49:25 EDT (Tue, 27 Apr 2010)
@@ -57,10 +57,12 @@
         {
             return s;
         }
+#ifndef BOOST_NO_STD_WSTRING
         inline std::string dump_sequence(const std::wstring &s)
         {
             return narrow(s.c_str());
         }
+#endif
     }
 
     /// Default path class. A path is a sequence of values. Groups of values


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