Commit f26e5597 by Chavdar Botev Committed by Paolo Carlini

re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_string)

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
parent e20f3dd1
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
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment