re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_...
authorChavdar Botev <cbotev@yahoo.com>
Sun, 28 Mar 2004 16:27:27 +0000 (16:27 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 28 Mar 2004 16:27:27 +0000 (16:27 +0000)
2004-03-28  Chavdar Botev  <cbotev@yahoo.com>

PR libstdc++/14245
* include/bits/basic_string.tcc
(basic_string::basic_string(const basic_string&)): Pass to
_Rep::_M_grab the actual allocator of the string being constructed
not the default constructed one.

From-SVN: r80041

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.tcc

index 1756701c5aae01e7f620fd1cf278c089ef0185ff..a3e9af694bcfebd8424df3b57d3aaa6cfee78efc 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-28  Chavdar Botev  <cbotev@yahoo.com>
+
+       PR libstdc++/14245
+       * include/bits/basic_string.tcc
+       (basic_string::basic_string(const basic_string&)): Pass to
+       _Rep::_M_grab the actual allocator of the string being constructed
+       not the default constructed one.
+
 2004-03-27  Benjamin Kosnik  <bkoz@redhat.com>
 
        libstdc++ PR/13598
index 4a79333ca87f45ba0ad2e54745ec64c2525050cc..4fa5e87fe22aa0216b58f3dfa25d56075b9a4bc9 100644 (file)
@@ -178,8 +178,9 @@ namespace std
   template<typename _CharT, typename _Traits, typename _Alloc>
     basic_string<_CharT, _Traits, _Alloc>::
     basic_string(const basic_string& __str)
-    : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()),
-                __str.get_allocator())
+    : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
+                                         __str.get_allocator()),
+                 __str.get_allocator())
     { }
 
   template<typename _CharT, typename _Traits, typename _Alloc>