From 1e8b3ee752d780cff082411872ae1e6f403eb6ba Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 9 Jun 2010 23:23:56 +0000 Subject: [PATCH] Make to_upperF and to_lowerF assignable. Fixes #3161. [SVN r62697] --- include/boost/algorithm/string/detail/case_conv.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/algorithm/string/detail/case_conv.hpp b/include/boost/algorithm/string/detail/case_conv.hpp index 3440c27..5b0064f 100644 --- a/include/boost/algorithm/string/detail/case_conv.hpp +++ b/include/boost/algorithm/string/detail/case_conv.hpp @@ -31,7 +31,7 @@ namespace boost { struct to_lowerF : public std::unary_function { // Constructor - to_lowerF( const std::locale& Loc ) : m_Loc( Loc ) {} + to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} // Operation CharT operator ()( CharT Ch ) const @@ -39,11 +39,11 @@ namespace boost { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::tolower( Ch); #else - return std::tolower( Ch, m_Loc ); + return std::tolower( Ch, *m_Loc ); #endif } private: - const std::locale& m_Loc; + const std::locale* m_Loc; }; // a toupper functor @@ -51,7 +51,7 @@ namespace boost { struct to_upperF : public std::unary_function { // Constructor - to_upperF( const std::locale& Loc ) : m_Loc( Loc ) {} + to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} // Operation CharT operator ()( CharT Ch ) const @@ -59,11 +59,11 @@ namespace boost { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper( Ch); #else - return std::toupper( Ch, m_Loc ); + return std::toupper( Ch, *m_Loc ); #endif } private: - const std::locale& m_Loc; + const std::locale* m_Loc; }; #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)