gcc/libstdc++-v3/include/debug
Jonathan Wakely 0d04fe4923 libstdc++: Add [[nodiscard]] to sequence containers
... and container adaptors.

This adds the [[nodiscard]] attribute to functions with no side-effects
for the sequence containers and their iterators, and the debug versions
of those containers, and the container adaptors,

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/forward_list.h: Add [[nodiscard]] to functions
	with no side-effects.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_queue.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/forward_list: Likewise.
	* include/debug/list: Likewise.
	* include/debug/safe_iterator.h: Likewise.
	* include/debug/vector: Likewise.
	* include/std/array: Likewise.
	* testsuite/23_containers/array/creation/3_neg.cc: Use
	-Wno-unused-result.
	* testsuite/23_containers/array/debug/back1_neg.cc: Cast result
	to void.
	* testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
	Likewise.
	* testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/deque/cons/clear_allocator.cc: Cast
	result to void.
	* testsuite/23_containers/deque/debug/invalidation/4.cc:
	Likewise.
	* testsuite/23_containers/deque/types/1.cc: Use
	-Wno-unused-result.
	* testsuite/23_containers/list/types/1.cc: Cast result to void.
	* testsuite/23_containers/priority_queue/members/7161.cc:
	Likewise.
	* testsuite/23_containers/queue/members/7157.cc: Likewise.
	* testsuite/23_containers/vector/59829.cc: Likewise.
	* testsuite/23_containers/vector/ext_pointer/types/1.cc:
	Likewise.
	* testsuite/23_containers/vector/ext_pointer/types/2.cc:
	Likewise.
	* testsuite/23_containers/vector/types/1.cc: Use
	-Wno-unused-result.
2021-08-04 12:54:29 +01:00
..
array libstdc++: Restore __gnu_debug::array [PR100682] 2021-07-22 13:53:57 +01:00
assertions.h libstdc++: Fix headers that can't be used as header units [PR 99413] 2021-03-10 15:27:41 +00:00
bitset
debug.h
deque libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
formatter.h libstdc++: [_GLIBCXX_DEBUG] Enhance rendering of assert message 2021-05-26 21:50:17 +02:00
forward_list libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
functions.h
helper_functions.h libstdc++: [_GLIBCXX_DEBUG] Fix management of __dp_sign_max_size [PR 99402] 2021-04-09 21:46:35 +02:00
list libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
macros.h libstdc++: Use __builtin_unreachable for constexpr assertions [PR 100676] 2021-05-20 20:49:57 +01:00
map
map.h libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
multimap.h libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
multiset.h libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
safe_base.h
safe_container.h
safe_iterator.h libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
safe_iterator.tcc libstdc++: [_GLIBCXX_DEBUG] Fix management of __dp_sign_max_size [PR 99402] 2021-04-09 21:46:35 +02:00
safe_local_iterator.h libstdc++: Implement N3644 for _GLIBCXX_DEBUG iterators 2021-01-14 19:23:54 +01:00
safe_local_iterator.tcc
safe_sequence.h
safe_sequence.tcc
safe_unordered_base.h
safe_unordered_container.h
safe_unordered_container.tcc
set
set.h libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
stl_iterator.h libstdc++: [_GLIBCXX_DEBUG] Fix management of __dp_sign_max_size [PR 99402] 2021-04-09 21:46:35 +02:00
string libstdc++: Fix and complete __gnu_debug::basic_string implementation 2021-03-25 21:56:14 +01:00
unordered_map libstdc++: Add unordered containers heterogeneous lookup 2021-02-09 21:56:27 +01:00
unordered_set libstdc++: Add unordered containers heterogeneous lookup 2021-02-09 21:56:27 +01:00
vector libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00