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 1756701..a3e9af6 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 4a79333..4fa5e87 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>