Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62697 - trunk/boost/algorithm/string/detail
From: steven_at_[hidden]
Date: 2010-06-09 19:23:56


Author: steven_watanabe
Date: 2010-06-09 19:23:56 EDT (Wed, 09 Jun 2010)
New Revision: 62697
URL: http://svn.boost.org/trac/boost/changeset/62697

Log:
Make to_upperF and to_lowerF assignable. Fixes #3161.
Text files modified:
   trunk/boost/algorithm/string/detail/case_conv.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 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 2010-06-09 19:23:56 EDT (Wed, 09 Jun 2010)
@@ -31,7 +31,7 @@
             struct to_lowerF : public std::unary_function<CharT, CharT>
             {
                 // 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 @@
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
                         return std::tolower( Ch);
                     #else
- return std::tolower<CharT>( Ch, m_Loc );
+ return std::tolower<CharT>( Ch, *m_Loc );
                     #endif
                 }
             private:
- const std::locale& m_Loc;
+ const std::locale* m_Loc;
             };
 
             // a toupper functor
@@ -51,7 +51,7 @@
             struct to_upperF : public std::unary_function<CharT, CharT>
             {
                 // 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 @@
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
                         return std::toupper( Ch);
                     #else
- return std::toupper<CharT>( Ch, m_Loc );
+ return std::toupper<CharT>( Ch, *m_Loc );
                     #endif
                 }
             private:
- const std::locale& m_Loc;
+ const std::locale* m_Loc;
             };
 
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)


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