gcc/libstdc++-v3/include/std
Paolo Carlini 391cd0955e PR libstdc++/9404, PR libstdc++/9701 (partial)
2003-02-24  Paolo Carlini <pcarlini@unitus.it>
	    Nathan Myers <ncm@cantrip.org>

	PR libstdc++/9404, PR libstdc++/9701 (partial)
	(aka pptr == epptr implies overflow)
	* include/bits/fstream.tcc (_M_allocate_internal_buffer):
	Consistently, _M_out_end points to the end of the buffer just
	created.
	(overflow): Tweak to use _M_out_buf_size().
	(_M_convert_to_external): The role of the old _M_out_end is
	now played by _M_out_lim.
	(_M_really_overflow): Likewise.
	(seekoff): Likewise.
	(setbuf): _M_out_end points to the end of the external buffer.
	* include/bits/sstream.tcc (overflow): Rewrote, taking into
	account the resolution of DR 169 (TC).
	(seekoff): Use _M_string.capacity(); ios_base::end is now _M_out_lim.
	(seekpos): Use _M_string.capacity(); tweak.
	* include/bits/streambuf.tcc (sputc, xsputn): Remove comments.
	* include/std/std_fstream.h (sync): The role of the old
	_M_out_end is now played by _M_out_lim.
	(_M_set_indeterminate): Use _M_set_determinate.
	(_M_set_determinate): _M_out_end is now _M_out_lim.
	(_M_is_indeterminate): Likewise.
	* include/std/std_sstream.h (str()): _M_out_end is now _M_out_lim.
	(_M_stringbuf_init): Don't set _M_buf_size, unused for sstreams,
	which have the information readily available as _M_string.capacity();
	for ate and app modes, pass the string size to _M_really_sync.
	(_M_really_sync): Consistently set _M_out_end and _M_out_lim, to
	point to the end of the buffer (i.e., epptr) and to the string end,
	respectively.
	* include/std/std_streambuf.h: tweak comments, add _M_out_lim,
	which points to the right limit of the used put area.
	(_M_out_cur_move): The role of the old _M_out_end is now played
	by _M_out_lim.
	(_M_out_buf_size): Simplify: now (when _M_out_cur) return simply
	_M_out_end  - _M_out_cur (i.e., pptr), _very_ close to the letter
	of the standard.
	(basic_streambuf()): Initialize _M_out_lim too.
	* testsuite/27_io/filebuf_virtuals.cc (test10): Trivial tweak.
	* testsuite/27_io/filebuf_virtuals.cc (test11): Add.
 	* testsuite/27_io/stringbuf_virtuals.cc (test09): Add.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r63367
2003-02-24 18:22:58 +00:00
..
std_algorithm.h
std_bitset.h std_bitset.h: Replace CHAR_BIT with __CHAR_BIT__, use numeric_limits for bits-per-word values. 2003-02-03 19:37:53 +00:00
std_complex.h Merge basic-improvements-branch to trunk 2002-12-16 18:23:00 +00:00
std_deque.h
std_fstream.h PR libstdc++/9404, PR libstdc++/9701 (partial) 2003-02-24 18:22:58 +00:00
std_functional.h
std_iomanip.h c++config (_GLIBCPP_EXTERN_TEMPLATE): Define. 2003-02-13 21:39:03 +00:00
std_ios.h
std_iosfwd.h Revert include ordering. 2003-01-23 18:56:00 +00:00
std_iostream.h TODO: Note change in clause 27 docs. 2002-11-21 07:06:41 +00:00
std_istream.h re PR libstdc++/9562 (ostream::sentry::operator bool () should be const) 2003-02-07 00:26:44 +00:00
std_iterator.h
std_limits.h c-common.c (builtin_define_float_constants): Define __<TYPE>_HAS_INFINITY__ and __<TYPE>_HAS_QUIET_NAN__. 2003-01-30 07:24:02 +00:00
std_list.h
std_locale.h locale_facets.h: Move non-facet classes requiring <string> to... 2003-01-22 16:51:52 +00:00
std_map.h
std_memory.h
std_numeric.h
std_ostream.h re PR libstdc++/9562 (ostream::sentry::operator bool () should be const) 2003-02-07 00:26:44 +00:00
std_queue.h
std_set.h
std_sstream.h PR libstdc++/9404, PR libstdc++/9701 (partial) 2003-02-24 18:22:58 +00:00
std_stack.h
std_stdexcept.h
std_streambuf.h PR libstdc++/9404, PR libstdc++/9701 (partial) 2003-02-24 18:22:58 +00:00
std_string.h
std_utility.h
std_valarray.h valarray_meta.h: Remove, split into ... 2003-01-24 16:32:11 +00:00
std_vector.h