gcc/libstdc++-v3/testsuite/25_algorithms
François Dumont 6004c17b4d libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos
Enhance those algos overloads to generalize existing optimization for
__gnu_debug::_Safe_iterator w/o _GLIBCXX_DEBUG mode and for std::deque
 iterators.

Also extend __copy_move_a2 ostreambuf_iterator overloads to std::vector and
std::deque iterators.

	* include/bits/stl_algobase.h
	(__copy_move_a1<>(_II, _II, _OI)): New.
	(__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
	(__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>,
	_Deque_iterator<>)): New.
	(__copy_move_a1<>(_II, _II, _Deque_iterator<>)): New.
	(__copy_move_a<>(_II, _II, _OI)): Adapt, call __copy_move_a1<>.
	(__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
	_OI)): New.
	(__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
	 const _Safe_iterator<>&)): New.
	(__copy_move_a<>(_II, _II, const _Safe_iterator<>&)): New.
	(copy, move): Adapt, call __copy_move_a.
	(__copy_move_backward_a1<>(_II, _II, _OI)): New,
	call __copy_move_backward_a2.
	(__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
	(__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>,
	_Deque_iterator<>)): New.
	(__copy_move_backward_a1<>(_II, _II, _Deque_iterator<>)): New.
	(__copy_move_backward_a<>(_II, _II, _OI)): Adapt, call
	__copy_move_backward_a1<>.
	(__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
	_OI)): New.
	(__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
	 const _Safe_iterator<>&)): New.
	(__copy_move_backward_a<>(_II, _II, const _Safe_iterator<>&)): New.
	(copy_backward, move_backward): Adapt, call __copy_move_backward_a<>.
	(__fill_a): Rename into...
	(__fill_a1): ... this.
	(__fill_a1(__normal_iterator<>, __normal_iterator<>, const _Tp&)): New.
	(__fill_a1(const _Deque_iterator<>&, const _Deque_iterator<>&, _VTp)):
	New.
	(__fill_a(_FIte, _FIte, const _Tp&)): New, call __fill_a1.
	(__fill_a(const _Safe_iterator<>&, const _Safe_iterator<>&,
	const _Tp&)): New.
	(fill): Adapt, remove __niter_base usage.
	(__fill_n_a): Rename into...
	(__fill_n_a1): ...this.
	(__fill_n_a(const _Safe_iterator<>&, _Size, const _Tp&,
	input_iterator_tag)): New.
	(__fill_n_a(_OI, _Size, const _Tp&, output_iterator_tag)): New, call
	__fill_n_a1.
	(__fill_n_a(_OI, _Size, const _Tp&, random_access_iterator_tag)): New,
	call __fill_a.
	(__equal_aux): Rename into...
	(__equal_aux1): ...this.
	(__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
	(__equal_aux1(_Deque_iterator<>, _Deque_iterator<>,
	_Deque_iterator<>)): New.
	(__equal_aux1(_II, _II, _Deque_iterator<>)): New.
	(__equal_aux(_II1, _II1, _II2)): New, call __equal_aux1.
	(__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&,
	_OI)): New.
	(__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&,
	 const _Safe_iterator<>&)): New.
	(__equal_aux(_II, _II, const _Safe_iterator<>&)): New.
	(equal(_II1, _II1, _II2)): Adapt.
	* include/bits/stl_deque.h
	(fill, copy, copy_backward, move, move_backward): Remove.
	* include/bits/deque.tcc: Include <bits/stl_algobase.h>.
	(__fill_a1): New.
	(__copy_move_dit): New.
	(__copy_move_a1): New, use latter.
	(__copy_move_a1(_II, _II, _Deque_iterator<>)): New.
	(__copy_move_backward_dit): New.
	(__copy_move_backward_a1): New, use latter.
	(__copy_move_backward_a1(_II, _II, _Deque_iterator<>)): New.
	(__equal_dit): New.
	(__equal_aux1): New, use latter.
	(__equal_aux1(_II, _II, _Deque_iterator<>)): New.
	* include/std/numeric (__is_random_access_iter): Move...
	* include/bits/stl_iterator_base_types.h (__is_random_access_iter): ...
	here. Provide pre-C++11 definition.
	* include/debug/debug.h (_Safe_iterator<>): New declaration.
	* include/debug/safe_iterator.h (_Safe_iterator<>::_M_can_advance): Add
	__strict parameter.
	* include/debug/safe_iterator.tcc: Include <bits/stl_algobase.h>.
	(_Safe_iterator<>::_M_can_advance): Adapt.
	(std::__copy_move_a, std::__copy_move_backward_a, __fill_a): New.
	(__fill_n_a, __equal_aux): New.
	* include/debug/stl_iterator.h (__niter_base): Remove.
	* include/debug/vector (__niter_base): Remove.
	* testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc:
	Include <vector> and <list>. Add benches.
	* testsuite/performance/25_algorithms/copy_deque_iterators.cc: Likewise.
	* testsuite/performance/25_algorithms/equal_deque_iterators.cc: Likewise.
	* testsuite/25_algorithms/copy/debug/1_neg.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/2.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/31.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/32.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/33.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/41.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/42.cc: New.
	* testsuite/25_algorithms/copy/deque_iterators/43.cc: New.
	* testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc (test02):
	New.
	* testsuite/25_algorithms/copy_backward/deque_iterators/2.cc: New.
	* testsuite/25_algorithms/equal/deque_iterators/1.cc: New.
	* testsuite/25_algorithms/fill/deque_iterators/1.cc: New.
	* testsuite/25_algorithms/move/deque_iterators/2.cc: New.
	* testsuite/25_algorithms/move_backward/deque_iterators/2.cc: New.

From-SVN: r279201
2019-12-10 21:49:55 +00:00
..
adjacent_find Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
advance/istreambuf_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
all_of Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
any_of Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
binary_search Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
clamp Update copyright years. 2019-01-01 13:31:55 +01:00
copy libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
copy_backward libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
copy_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
copy_n Add std::copy_n istreambuf_iterator specialization 2019-10-06 15:29:04 +00:00
count Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
count_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
equal libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
equal_range Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
fill libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
fill_n Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
find Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
find_end Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
find_first_of Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
find_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
find_if_not Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
for_each libstdc++: make negative count safe with std::for_each_n 2019-11-07 23:10:45 +00:00
generate Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
generate_n Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
headers Implement C++20 p0879 - Constexpr for swap and swap related functions. 2019-08-14 17:54:15 +00:00
heap Update copyright years. 2019-01-01 13:31:55 +01:00
includes Update copyright years. 2019-01-01 13:31:55 +01:00
inplace_merge Update copyright years. 2019-01-01 13:31:55 +01:00
is_heap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
is_heap_until Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
is_partitioned Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
is_permutation Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
is_sorted stl_algo.h (merge): Fix documentation. 2019-09-28 21:11:55 +00:00
is_sorted_until Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
iter_swap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
lexicographical_compare Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
lexicographical_compare_three_way libstdc++: Define std::lexicographical_compare_three_way for C++20 2019-12-05 12:46:50 +00:00
lower_bound Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
make_heap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
max Update copyright years. 2019-01-01 13:31:55 +01:00
max_element Update copyright years. 2019-01-01 13:31:55 +01:00
merge stl_algo.h (merge): Fix documentation. 2019-09-28 21:11:55 +00:00
min Update copyright years. 2019-01-01 13:31:55 +01:00
min_element Update copyright years. 2019-01-01 13:31:55 +01:00
minmax Update copyright years. 2019-01-01 13:31:55 +01:00
minmax_element Update copyright years. 2019-01-01 13:31:55 +01:00
mismatch Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
move libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
move_backward libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
next_permutation Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
none_of Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
nth_element Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
partial_sort Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
partial_sort_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
partition Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
partition_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
partition_point Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
pop_heap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
prev_permutation Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
pstl Fix incorrect __cpp_lib_parallel_algorithm macro definitions 2019-06-12 21:16:03 +01:00
push_heap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
random_shuffle Update copyright years. 2019-01-01 13:31:55 +01:00
remove Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
remove_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
remove_copy_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
remove_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
replace Update copyright years. 2019-01-01 13:31:55 +01:00
replace_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
replace_copy_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
replace_if Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
reverse Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
reverse_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
rotate Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
rotate_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
sample Update copyright years. 2019-01-01 13:31:55 +01:00
search Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
search_n Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
set_difference Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
set_intersection Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
set_symmetric_difference Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
set_union Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
shuffle Update copyright years. 2019-01-01 13:31:55 +01:00
sort Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
sort_heap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
stable_partition Update copyright years. 2019-01-01 13:31:55 +01:00
stable_sort Update copyright years. 2019-01-01 13:31:55 +01:00
swap Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
swap_ranges Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
transform Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
unique Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
unique_copy Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
upper_bound Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
constexpr_macro.cc Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
cpp_lib_constexpr.cc Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00