gcc/libstdc++-v3/include/debug
François Dumont 01b1afdc35 libstdc++: [_GLIBCXX_DEBUG] Do not consider detached iterators as value-initialized
An attach iterator has its _M_version set to something != 0, the container version. This
value shall be preserved when detaching it so that the iterator does not look like a
value-initialized one.

libstdc++-v3/ChangeLog:

	* include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
	(_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
	parameter is value-initialized.
	(_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
	* include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
	checks.
	* include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
	Adapt checks.
	* src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
	(print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
	* testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
	* testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
	* testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
	* testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
	* testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
2022-08-08 20:11:59 +02:00
..
array Update copyright years. 2022-01-03 10:42:10 +01:00
assertions.h Update copyright years. 2022-01-03 10:42:10 +01:00
bitset Update copyright years. 2022-01-03 10:42:10 +01:00
debug.h libstdc++: Complete __gnu_debug::string Standard conformity 2022-07-19 20:07:28 +02:00
deque Update copyright years. 2022-01-03 10:42:10 +01:00
formatter.h libstdc++: [_GLIBCXX_DEBUG] Do not consider detached iterators as value-initialized 2022-08-08 20:11:59 +02:00
forward_list Update copyright years. 2022-01-03 10:42:10 +01:00
functions.h Update copyright years. 2022-01-03 10:42:10 +01:00
helper_functions.h Update copyright years. 2022-01-03 10:42:10 +01:00
list Update copyright years. 2022-01-03 10:42:10 +01:00
macros.h libstdc++: Complete __gnu_debug::string Standard conformity 2022-07-19 20:07:28 +02:00
map Update copyright years. 2022-01-03 10:42:10 +01:00
map.h Update copyright years. 2022-01-03 10:42:10 +01:00
multimap.h Update copyright years. 2022-01-03 10:42:10 +01:00
multiset.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_base.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_container.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_iterator.h libstdc++: [_GLIBCXX_DEBUG] Do not consider detached iterators as value-initialized 2022-08-08 20:11:59 +02:00
safe_iterator.tcc Update copyright years. 2022-01-03 10:42:10 +01:00
safe_local_iterator.h libstdc++: [_GLIBCXX_DEBUG] Do not consider detached iterators as value-initialized 2022-08-08 20:11:59 +02:00
safe_local_iterator.tcc Update copyright years. 2022-01-03 10:42:10 +01:00
safe_sequence.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_sequence.tcc Update copyright years. 2022-01-03 10:42:10 +01:00
safe_unordered_base.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_unordered_container.h Update copyright years. 2022-01-03 10:42:10 +01:00
safe_unordered_container.tcc Update copyright years. 2022-01-03 10:42:10 +01:00
set Update copyright years. 2022-01-03 10:42:10 +01:00
set.h Update copyright years. 2022-01-03 10:42:10 +01:00
stl_iterator.h Update copyright years. 2022-01-03 10:42:10 +01:00
string libstdc++: Complete __gnu_debug::string Standard conformity 2022-07-19 20:07:28 +02:00
unordered_map Update copyright years. 2022-01-03 10:42:10 +01:00
unordered_set Update copyright years. 2022-01-03 10:42:10 +01:00
vector Update copyright years. 2022-01-03 10:42:10 +01:00