gcc/libstdc++-v3/testsuite/24_iterators
Jonathan Wakely 7918cb93f6 libstdc++: Make istreambuf_iterator base class consistent (PR92285)
Since LWG 445 was implemented for GCC 4.7, the std::iterator base class
of std::istreambuf_iterator changes type depending on the -std mode
used. This creates an ABI incompatibility between different -std modes.

This change ensures the base class always has the same type. This makes
layout for C++98 compatible with the current -std=gnu++14 default, but
no longer compatible with C++98 code from previous releases. In practice
this is unlikely to cause real problems, because it only affects the
layout of types with two std::iterator base classes, one of which comes
from std::istreambuf_iterator. Such types are expected to be vanishingly
rare.

	PR libstdc++/92285
	* include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
	of base class independent of __cplusplus value.
	[__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
	type defined in the base class
	* testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
	* testsuite/24_iterators/istreambuf_iterator/requirements/
	base_classes.cc: Adjust expected base class for C++98.

From-SVN: r280116
2020-01-10 15:27:39 +00:00
..
associated_types Update copyright years. 2020-01-01 12:51:42 +01:00
back_insert_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
bidirectional Update copyright years. 2020-01-01 12:51:42 +01:00
common_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
contiguous Update copyright years. 2020-01-01 12:51:42 +01:00
counted_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
customization_points Update copyright years. 2020-01-01 12:51:42 +01:00
forward Update copyright years. 2020-01-01 12:51:42 +01:00
front_insert_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
headers/iterator Update copyright years. 2020-01-01 12:51:42 +01:00
indirect_callable Update copyright years. 2020-01-01 12:51:42 +01:00
input Update copyright years. 2020-01-01 12:51:42 +01:00
insert_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
istream_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
istreambuf_iterator libstdc++: Make istreambuf_iterator base class consistent (PR92285) 2020-01-10 15:27:39 +00:00
move_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
normal_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
operations Update copyright years. 2020-01-01 12:51:42 +01:00
ostream_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
ostreambuf_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
output Update copyright years. 2020-01-01 12:51:42 +01:00
random_access Update copyright years. 2020-01-01 12:51:42 +01:00
range_access Update copyright years. 2020-01-01 12:51:42 +01:00
range_operations Update copyright years. 2020-01-01 12:51:42 +01:00
reverse_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
container_access.cc Update copyright years. 2020-01-01 12:51:42 +01:00