gcc/libstdc++-v3/testsuite/23_containers/vector
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
..
allocator c++: value-init vs zero-init in expand_aggr_init_1 [PR65816] 2021-06-01 16:21:10 -04:00
bool c++: value-init vs zero-init in expand_aggr_init_1 [PR65816] 2021-06-01 16:21:10 -04:00
capacity Update copyright years. 2021-01-04 10:26:59 +01:00
cons libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
data_access Update copyright years. 2021-01-04 10:26:59 +01:00
debug Update copyright years. 2021-01-04 10:26:59 +01:00
element_access Update copyright years. 2021-01-04 10:26:59 +01:00
ext_pointer libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
modifiers libstdc++: Remove redundant -std=gnu++17 option from containers tests 2021-05-10 16:22:53 +01:00
profile re PR libstdc++/68838 (AIX 32 bit wchar_t testsuite failures) 2016-11-29 12:50:27 -05:00
requirements Update copyright years. 2021-01-04 10:26:59 +01:00
types libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
14340.cc Update copyright years. 2021-01-04 10:26:59 +01:00
15523.cc Update copyright years. 2021-01-04 10:26:59 +01:00
18604.cc Update copyright years. 2021-01-04 10:26:59 +01:00
26412-1.cc Update copyright years. 2021-01-04 10:26:59 +01:00
26412-2.cc Update copyright years. 2021-01-04 10:26:59 +01:00
40192.cc Update copyright years. 2021-01-04 10:26:59 +01:00
48101_neg.cc Update copyright years. 2021-01-04 10:26:59 +01:00
48101-2_neg.cc Update copyright years. 2021-01-04 10:26:59 +01:00
48101-3_neg.cc Update copyright years. 2021-01-04 10:26:59 +01:00
52591.cc Update copyright years. 2021-01-04 10:26:59 +01:00
58764.cc Update copyright years. 2021-01-04 10:26:59 +01:00
59829.cc libstdc++: Add [[nodiscard]] to sequence containers 2021-08-04 12:54:29 +01:00
63500.cc Update copyright years. 2021-01-04 10:26:59 +01:00
70303.cc libstdc++: Make deque iterator operator- usable with value-init iterators 2021-02-01 19:19:53 +01:00
92124.cc Update copyright years. 2021-01-04 10:26:59 +01:00
check_construct_destroy.cc Update copyright years. 2021-01-04 10:26:59 +01:00
cmp_c++20.cc Update copyright years. 2021-01-04 10:26:59 +01:00
debug_mode_requires_reallocation-1.cc Update copyright years. 2021-01-04 10:26:59 +01:00
debug_mode_requires_reallocation-2.cc Update copyright years. 2021-01-04 10:26:59 +01:00
erasure.cc Update copyright years. 2021-01-04 10:26:59 +01:00
init-list.cc Update copyright years. 2021-01-04 10:26:59 +01:00
pmr_typedefs.cc libstdc++: Remove redundant -std=gnu++17 option from PMR tests 2021-05-10 16:22:53 +01:00
range_access.cc libstdc++: Add [[nodiscard]] to iterators and related utilities 2021-08-04 12:54:28 +01:00
zero_sized_allocations.cc Update copyright years. 2021-01-04 10:26:59 +01:00