gcc/libstdc++-v3/testsuite/23_containers
Jonathan Wakely ef45724acd P0646R1 Improving the Return Value of Erase-Like Algorithms I
In C++2a the remove, remove_if and unique members of std::list and
std::forward_list have been changed to return the number of elements
removed. This is an ABI change for the remove members and the
non-template unique members, so an abi-tag is used to give those symbols
new mangled names in C++2a mode. For the function templates the return
type is part of the mangled name so no abi-tag is needed.

	* include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
	Define.
	(forward_list::__remove_return_type): Define typedef as size_type or
	void, according to __cplusplus value.
	(_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
	empty, according to __cplusplus value.
	(forward_list::remove, forward_list::unique): Use typedef and macro
	to change return type and add abi-tag for C++2a.
	(forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
	typedef to change return type for C++2a.
	* include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
	(forward_list::remove, forward_list::remove_if<Pred>)
	(forward_list::unique<BinPred>): Return number of removed elements
	for C++2a.
	* include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
	(list::remove, list::unique, list::remove_if<Predicate>)
	(list::unique<BinaryPredicate>): Return number of removed elements
	for C++2a.
	* include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
	(list::__remove_return_type): Define typedef as size_type or
	void, according to __cplusplus value.
	(_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
	empty, according to __cplusplus value.
	(list::remove, list::unique): Use typedef and macro to change return
	type and add abi-tag for C++2a.
	(list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
	typedef to change return type for C++2a.
	* include/std/version (__cpp_lib_list_remove_return_type): Define.
	* testsuite/23_containers/forward_list/operations/
	remove_cxx20_return.cc: New.
	* testsuite/23_containers/forward_list/operations/
	unique_cxx20_return.cc: New.

From-SVN: r262423
2018-07-04 21:15:01 +01:00
..
array Add whitespace to some dejagnu directives in libstdc++ tests 2018-06-29 10:54:07 +01:00
bitset Update copyright years. 2018-01-03 11:03:58 +01:00
deque deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
forward_list P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
headers Update copyright years. 2018-01-03 11:03:58 +01:00
list P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
map P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
multimap P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
multiset P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
priority_queue Update copyright years. 2018-01-03 11:03:58 +01:00
queue Update copyright years. 2018-01-03 11:03:58 +01:00
set P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
stack Update copyright years. 2018-01-03 11:03:58 +01:00
unordered_map P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
unordered_multimap P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
unordered_multiset P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
unordered_set P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
vector stl_vector.h (struct _Vector_base<>::_Vector_impl_data): New. 2018-06-27 20:23:20 +00:00