From: Chavdar Botev Date: Sun, 28 Mar 2004 16:27:27 +0000 (+0000) Subject: re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_... X-Git-Tag: releases/gcc-4.0.0~9128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f26e5597f0272d7e4e20fe2c3728a064276f6ab0;p=thirdparty%2Fgcc.git re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_string) 2004-03-28 Chavdar Botev 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1756701c5aae..a3e9af694bcf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2004-03-28 Chavdar Botev + + 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 libstdc++ PR/13598 diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 4a79333ca87f..4fa5e87fe22a 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -178,8 +178,9 @@ namespace std template 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