Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55377 - trunk/boost/mpl
From: eric_at_[hidden]
Date: 2009-08-02 20:24:48


Author: eric_niebler
Date: 2009-08-02 20:24:46 EDT (Sun, 02 Aug 2009)
New Revision: 55377
URL: http://svn.boost.org/trac/boost/changeset/55377

Log:
more generic c_str implementation from Mathis Gaunard
Text files modified:
   trunk/boost/mpl/string.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/mpl/string.hpp
==============================================================================
--- trunk/boost/mpl/string.hpp (original)
+++ trunk/boost/mpl/string.hpp 2009-08-02 20:24:46 EDT (Sun, 02 Aug 2009)
@@ -44,7 +44,6 @@
 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
 #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <iterator>
 
 #include <iterator> // for bidirectional_iterator_tag
 #include <climits>
@@ -499,6 +498,7 @@
           , back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS))
         };
 
+ typedef char value_type;
         typedef string type;
         typedef string_tag tag;
     };
@@ -541,11 +541,11 @@
         #undef M0
 
         typedef c_str type;
- static char const value[];
+ static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1];
     };
 
     template<typename Sequence>
- char const c_str<Sequence>::value[] =
+ typename Sequence::value_type const c_str<Sequence>::value[BOOST_MPL_LIMIT_STRING_SIZE+1] =
     {
         #define M0(z, n, data) \
         mpl::aux_::deref_unless<BOOST_PP_CAT(i, n), iend>::type::value,


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