gcc/libstdc++-v3/include/std
David Krauss 3531cf5ef3 re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer)
2010-09-22  David Krauss  <potswa@mac.com>

	PR libstdc++/45628
	* include/bits/fstream.tcc (basic_filebuf::underflow): Add state
	transition to avoid modality requiring seekoff(0,ios::cur).
	(basic_filebuf::pbackfail): Likewise.
	(basic_filebuf::overflow): Likewise.
	(basic_filebuf::_M_seek): Avoid minor unnecessary conversion.
	(basic_filebuf::seekoff): Remove code to _M_get_ext_pos; make
	(0, ios::cur) a special case preserving buffer contents.
	(basic_filebuf::_M_get_ext_pos): New function to obtain status
	about codecvt extern_t buffer for overflow and seekoff.
	* include/std/fstream (basic_filebuf::_M_get_ext_pos): Likewise.
	* config/abi/pre/gnu.ver: Export new symbols.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-1.cc: New,
	verifies that seekoff(0, ios::cur) preserves buffers.
	* testsuite/27_io/basic_filebuf/seekoff/char/45628-2.cc: Likewise.
	for codecvt case. More lenient as it may still flush put area.
	* testsuite/27_io/basic_filebuf/seekoff/char/4.cc: Modify to
	check that seekoff is not required between read and write.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Remove.
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc: Likewise.
	* testsuite/util/testsuite_character.h (codecvt::do_length): Comply
	with 22.2.1.5.2/10 "Returns ... the LARGEST value in the range..."

From-SVN: r164529
2010-09-22 19:40:43 +00:00
..
algorithm algorithm: Include <utility>, per UK-300. 2009-11-13 15:06:28 +00:00
array [multiple changes] 2010-07-27 17:27:06 +00:00
atomic re PR libstdc++/45398 ([C++0x] Missing atomic<_Tp*>::store definition) 2010-09-07 14:05:23 +00:00
bitset functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
chrono hashtable.h: Fold in include/tr1_impl/hashtable.h contents. 2010-02-10 19:14:33 +00:00
complex complex (complex<float>::operator=(float), [...]): Simplify a tad... 2010-09-16 12:39:13 +00:00
condition_variable hashtable.h: Fold in include/tr1_impl/hashtable.h contents. 2010-02-10 19:14:33 +00:00
deque [multiple changes] 2010-07-27 17:27:06 +00:00
forward_list [multiple changes] 2010-07-27 17:27:06 +00:00
fstream re PR libstdc++/45628 (std::fstream::tellg invalidates I/O buffer) 2010-09-22 19:40:43 +00:00
functional utility (begin, end): Remove per GB 85. 2010-08-05 08:45:26 +00:00
future PR libstdc++/42819, DR 1315 2010-02-12 22:31:15 +00:00
iomanip iomanip (get_money, put_money): Add in C++0x mode; tidy. 2010-03-01 19:12:39 +00:00
ios Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
iosfwd re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
iostream re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
istream [multiple changes] 2010-02-09 04:49:49 +00:00
iterator [multiple changes] 2010-07-27 17:27:06 +00:00
limits limits (__numeric_limits_base::max_digits10, [...]): Add. 2010-02-25 17:13:04 +00:00
list [multiple changes] 2010-07-27 17:27:06 +00:00
locale Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
map [multiple changes] 2010-07-27 17:27:06 +00:00
memory cons_overflow_neg.cc: Avoid -Wall warnings. 2010-08-10 10:08:56 +00:00
mutex c++config (std::size_t, [...]): Provide typedefs. 2010-06-03 19:15:56 +00:00
numeric PR libstdc++/22634, DR 539 [Ready] 2009-12-11 17:54:37 +00:00
ostream re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
queue Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
random hashtable.h: Fold in include/tr1_impl/hashtable.h contents. 2010-02-10 19:14:33 +00:00
ratio ratio (ratio_less): Improve, use ratio_divide to avoid more overflows. 2010-08-06 08:58:27 +00:00
regex [multiple changes] 2010-07-27 17:27:06 +00:00
set [multiple changes] 2010-07-27 17:27:06 +00:00
sstream re PR libstdc++/42460 (man page errors for generated libstdc++ man pages) 2010-02-04 18:20:34 +00:00
stack Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
stdexcept Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
streambuf streambuf: Adjust doxygen group markup. 2010-02-10 05:45:24 +00:00
string [multiple changes] 2010-07-27 17:27:06 +00:00
system_error functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
thread functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
tuple re PR libstdc++/45228 ([C++0x] Can't copy-construct "tuple<int,int,int>" from "const tuple<int,int,int>" rvalue) 2010-08-10 07:17:44 +00:00
type_traits type_traits (is_convertible): Use SFINAE. 2010-07-11 09:13:26 +00:00
typeindex functional_hash.h (__hash_base): Add. 2010-09-22 17:50:36 +00:00
unordered_map [multiple changes] 2010-07-27 17:27:06 +00:00
unordered_set [multiple changes] 2010-07-27 17:27:06 +00:00
utility user.cfg.in: Adjust includes. 2009-11-06 22:15:17 +00:00
valarray [multiple changes] 2010-07-27 17:27:06 +00:00
vector [multiple changes] 2010-07-27 17:27:06 +00:00