Skip to content

Commit 6fbc740

Browse files
committed
should correct #3634; will close when merged to release
[SVN r76435]
1 parent d518994 commit 6fbc740

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/boost/algorithm/string/detail/case_conv.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <locale>
1616
#include <functional>
1717

18+
#include <boost/type_traits/make_unsigned.hpp>
19+
1820
namespace boost {
1921
namespace algorithm {
2022
namespace detail {
@@ -37,7 +39,7 @@ namespace boost {
3739
CharT operator ()( CharT Ch ) const
3840
{
3941
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
40-
return std::tolower( Ch);
42+
return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
4143
#else
4244
return std::tolower<CharT>( Ch, *m_Loc );
4345
#endif
@@ -57,7 +59,7 @@ namespace boost {
5759
CharT operator ()( CharT Ch ) const
5860
{
5961
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
60-
return std::toupper( Ch);
62+
return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
6163
#else
6264
return std::toupper<CharT>( Ch, *m_Loc );
6365
#endif

0 commit comments

Comments
 (0)