gcc/libstdc++-v3/include
Paolo Carlini ec61e852bc basic_string.h (_Rep::_M_is_safe, [...]): New, use througout.
2004-10-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_Rep::_M_is_safe, _M_check_length,
	_M_move, _M_copy, _M_assign): New, use througout.
	(operator+=(_CharT)): Define in terms of push_back.
	(append(const basic_string&)): Define here, inline, and simplify,
	don't use the full _M_replace_safe.
	(append(size_type, _CharT)): Likewise, don't use _M_replace_aux.
	(push_back): Likewise.
	(assign(const basic_string&)): Define here, inline.
	* include/bits/basic_string.tcc (append(const _CharT* s, size_type):
	Fix: when s points inside the _Rep, upon reallocation (reserve) we
	were copying from deallocated memory.
	(append(const basic_string&, size_type, size_type)): Simplify,
	don't use _M_replace_safe.
	(replace(size_type, size_type, const _CharT*, size_type)): Slightly
	tweak.
	(reserve): Likewise.
	* testsuite/21_strings/basic_string/append/char/2.cc: New.
	* testsuite/21_strings/basic_string/append/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/append/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/append/wchar_t/3.cc: Likewise.

	* testsuite/21_strings/basic_string/assign/char/3.cc: Remove junk.
	* testsuite/21_strings/basic_string/assign/wchar_t/3.cc: Likewise.

From-SVN: r89526
2004-10-25 08:45:04 +00:00
..
backward re PR libstdc++/12854 (libstdc++ vs. -Weffc++) 2004-05-22 23:46:34 +00:00
bits basic_string.h (_Rep::_M_is_safe, [...]): New, use througout. 2004-10-25 08:45:04 +00:00
c std_cctype.h, [...]: Remove trailing whitespace. 2003-12-09 04:41:52 +01:00
c_compatibility iso646.h, [...]: Remove trailing whitespace. 2003-12-09 04:51:46 +01:00
c_std cmath.tcc (__cmath_power): Revert previous commit: actually the warning is a front-end bug (c++/17120). 2004-08-20 14:56:29 +00:00
debug re PR libstdc++/16813 (compiler error in DEBUG version of range insertion std::map::insert) 2004-07-29 10:52:49 +00:00
ext bitmap_allocator.h (allocate): Throw std::bad_alloc when n > max_size(). 2004-10-21 00:06:02 +00:00
std std_memory.h (__get_temporary_buffer): Don't use INT_MAX... 2004-10-09 08:23:02 +00:00
tr1 array (array): Make safe for zero-sized arrays. 2004-10-22 05:32:16 +00:00
Makefile.am tr1: New. 2004-10-07 22:06:23 +00:00
Makefile.in tr1: New. 2004-10-07 22:06:23 +00:00
stdc++.h