Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68494 - trunk/boost/spirit/home/support
From: blelbach_at_[hidden]
Date: 2011-01-27 17:59:19


Author: wash
Date: 2011-01-27 17:59:14 EST (Thu, 27 Jan 2011)
New Revision: 68494
URL: http://svn.boost.org/trac/boost/changeset/68494

Log:
Removed unnecessary overload for the std::basic_string<> overload of
extract_c_string, added embedded char_type typedef to extract_c_string
specializations that were missing it.

Text files modified:
   trunk/boost/spirit/home/support/string_traits.hpp | 11 ++++++-----
   1 files changed, 6 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/support/string_traits.hpp
==============================================================================
--- trunk/boost/spirit/home/support/string_traits.hpp (original)
+++ trunk/boost/spirit/home/support/string_traits.hpp 2011-01-27 17:59:14 EST (Thu, 27 Jan 2011)
@@ -172,6 +172,8 @@
     template <typename T>
     struct extract_c_string<T const>
     {
+ typedef typename extract_c_string<T>::char_type char_type;
+
         static typename extract_c_string<T>::char_type const* call (T const str)
         {
             return extract_c_string<T>::call(str);
@@ -182,6 +184,8 @@
     template <typename T>
     struct extract_c_string<T&>
     {
+ typedef typename extract_c_string<T>::char_type char_type;
+
         static typename extract_c_string<T>::char_type const* call (T& str)
         {
             return extract_c_string<T>::call(str);
@@ -192,6 +196,8 @@
     template <typename T>
     struct extract_c_string<T const&>
     {
+ typedef typename extract_c_string<T>::char_type char_type;
+
         static typename extract_c_string<T>::char_type const* call (T const& str)
         {
             return extract_c_string<T>::call(str);
@@ -205,11 +211,6 @@
 
         typedef std::basic_string<T, Traits, Allocator> string;
 
- static T const* call (string& str)
- {
- return str.c_str();
- }
-
         static T const* call (string const& str)
         {
             return str.c_str();


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