Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76435 - trunk/boost/algorithm/string/detail
From: marshall_at_[hidden]
Date: 2012-01-12 13:35:06


Author: marshall
Date: 2012-01-12 13:35:06 EST (Thu, 12 Jan 2012)
New Revision: 76435
URL: http://svn.boost.org/trac/boost/changeset/76435

Log:
should correct #3634; will close when merged to release
Text files modified:
   trunk/boost/algorithm/string/detail/case_conv.hpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/algorithm/string/detail/case_conv.hpp
==============================================================================
--- trunk/boost/algorithm/string/detail/case_conv.hpp (original)
+++ trunk/boost/algorithm/string/detail/case_conv.hpp 2012-01-12 13:35:06 EST (Thu, 12 Jan 2012)
@@ -15,6 +15,8 @@
 #include <locale>
 #include <functional>
 
+#include <boost/type_traits/make_unsigned.hpp>
+
 namespace boost {
     namespace algorithm {
         namespace detail {
@@ -37,7 +39,7 @@
                 CharT operator ()( CharT Ch ) const
                 {
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
- return std::tolower( Ch);
+ return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
                     #else
                         return std::tolower<CharT>( Ch, *m_Loc );
                     #endif
@@ -57,7 +59,7 @@
                 CharT operator ()( CharT Ch ) const
                 {
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
- return std::toupper( Ch);
+ return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
                     #else
                         return std::toupper<CharT>( Ch, *m_Loc );
                     #endif


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