[multiple changes]
authorPaolo Carlini <paolo@gcc.gnu.org>
Wed, 6 Oct 2004 09:06:59 +0000 (09:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 6 Oct 2004 09:06:59 +0000 (09:06 +0000)
commitdbb8bfe8c5f697ec3f94251022aaccd13f95f4e9
treea61ec5e853da128ae4a816a6a9277aa4e371d323
parent490e962939608e17505eaa8a5358e59a26af0fe7
[multiple changes]

2004-10-06  Paolo Carlini  <pcarlini@suse.de>

* include/std/std_sstream.h (_M_sync): When the caller is
setbuf, don't trust _M_string.capacity() to be the size of
the buffer area, use _M_string.size() in this case.
* testsuite/27_io/basic_stringbuf/setbuf/char/4.cc: New.
* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc: Likewise.

* include/bits/sstream.tcc (overflow): Avoid calling string::assign
unnecessarily when the current _M_string is empty.

2004-10-06  Paolo Carlini  <pcarlini@suse.de>

* include/bits/stl_algo.h (__reverse(bidirectional_iterator_tag)):
Avoid iterator postincrement.
(__rotate): Likewise.

* include/bits/stl_algo.h: Minor formatting tweaks.

2004-10-06  Christopher Jefferson <caj@cs.york.ac.uk>

* include/bits/stl_algo.h (__reverse(random_access_iterator_tag)):
Avoid iterator postincrement; fix swapping middle element with
itself on odd-length inputs.

From-SVN: r88593
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/sstream.tcc
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/std/std_sstream.h
libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc [new file with mode: 0644]