gcc/libstdc++-v3/include/bits
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
..
algorithmfwd.h Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
alloc_traits.h libstdc++: Fix some -Wsystem-headers warnings 2019-11-18 12:46:02 +00:00
allocated_ptr.h
allocator.h Fix compilation with Clang 2019-10-25 18:02:35 +01:00
atomic_base.h Define std::atomic_ref and std::atomic<floating-point> for C++20 2019-07-11 20:43:25 +01:00
atomic_futex.h
basic_ios.h
basic_ios.tcc
basic_string.h Remove redundant std::allocator members for C++20 2019-10-22 22:48:39 +01:00
basic_string.tcc LWG2788 basic_string spurious use of a default constructible allocator 2019-05-30 20:48:48 +01:00
boost_concept_check.h
c++0x_warning.h
c++config libstdc++: P1423R3 char8_t remediation (2/4) 2019-11-29 17:43:42 +00:00
char_traits.h
charconv.h Avoid warnings in <charconv> 2019-10-11 16:29:50 +01:00
codecvt.h
concept_check.h
cpp_type_traits.h libstdc++: Implement spaceship for std::array (P1614R2) 2019-12-05 00:42:06 +00:00
deque.tcc libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
enable_special_members.h
erase_if.h
forward_list.h PR libstdc++/92124 fix incorrect container move assignment 2019-10-17 15:21:27 +01:00
forward_list.tcc
fs_dir.h
fs_fwd.h
fs_ops.h
fs_path.h libstdc++: Fix experimental::filesystem::u8path(const Source&) for Windows 2019-11-30 01:03:36 +00:00
fstream.tcc
functexcept.h
functional_hash.h
gslice_array.h
gslice.h
hashtable_policy.h Simplify node ownership in _Hashtable members 2019-06-17 11:25:04 +01:00
hashtable.h Simplify node ownership in _Hashtable members 2019-06-17 11:25:04 +01:00
indirect_array.h
invoke.h Fix __invoke_r<void> to be valid in C++11 2019-05-17 10:28:17 +01:00
ios_base.h libstdc++: Fix description of std::ios::trunc (PR 92886) 2019-12-10 17:35:42 +00:00
istream.tcc
iterator_concepts.h libstdc++: Fix bug in std::indirect_result_t 2019-12-10 16:15:49 +00:00
list.tcc
locale_classes.h
locale_classes.tcc
locale_conv.h PR libstdc++/90281 Fix string conversions for filesystem::path 2019-06-17 15:19:04 +01:00
locale_facets_nonio.h
locale_facets_nonio.tcc
locale_facets.h
locale_facets.tcc
localefwd.h
mask_array.h
memoryfwd.h Do not declare std::uses_allocator before C++11 2019-10-22 22:48:53 +01:00
move.h Add iterator concepts and range access customization points for C++20 2019-10-29 17:44:18 +00:00
node_handle.h
ostream_insert.h
ostream.tcc
parse_numbers.h
postypes.h
predefined_ops.h Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. 2019-08-01 15:25:42 +00:00
ptr_traits.h
quoted_string.h
random.h Define std::uniform_random_bit_generator concept for C++20 2019-10-24 10:35:07 +01:00
random.tcc
range_access.h libstdc++: Implement ranges::safe_range for C++20 (P1870R1) 2019-12-09 17:35:24 +00:00
range_cmp.h Guard use of concepts with feature test macro 2019-10-25 14:29:37 +01:00
refwrap.h Add remaining changes from P1065R2 "constexpr INVOKE" 2019-10-31 23:03:22 +00:00
regex_automaton.h
regex_automaton.tcc
regex_compiler.h
regex_compiler.tcc
regex_constants.h
regex_error.h
regex_executor.h
regex_executor.tcc
regex_scanner.h
regex_scanner.tcc
regex.h libstdc++: Fix declarations of variable templates 2019-11-19 09:34:59 +00:00
regex.tcc Make std::match_results::_M_resize more useful 2019-05-14 13:19:05 +01:00
shared_ptr_atomic.h Improve smart pointer docs 2019-05-02 22:23:25 +01:00
shared_ptr_base.h LWG 2996 add rvalue overloads for shared_ptr aliasing and casting 2019-05-23 22:41:02 +01:00
shared_ptr.h LWG 2996 add rvalue overloads for shared_ptr aliasing and casting 2019-05-23 22:41:02 +01:00
slice_array.h
specfun.h
sstream.tcc
std_abs.h
std_function.h PR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues 2019-08-15 17:07:27 +01:00
std_mutex.h
stl_algo.h libstdc++: make negative count safe with std::for_each_n 2019-11-07 23:10:45 +00:00
stl_algobase.h libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
stl_bvector.h Apply C++20 changes to various iterator types 2019-10-30 15:48:11 +00:00
stl_construct.h Fix compilation errors with Clang 2019-10-29 20:16:57 +00:00
stl_deque.h libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
stl_function.h
stl_heap.h Implement C++20 p0879 - Constexpr for swap and swap related functions. 2019-08-14 17:54:15 +00:00
stl_iterator_base_funcs.h
stl_iterator_base_types.h libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos 2019-12-10 21:49:55 +00:00
stl_iterator.h libstdc++: Add move_sentinel, common_iterator and counted_iterator 2019-11-25 19:02:03 +00:00
stl_list.h PR libstdc++/92124 fix incorrect container move assignment 2019-10-17 15:21:27 +01:00
stl_map.h Fix uses of static_assert not guarded by C++11 check 2019-06-03 23:18:31 +01:00
stl_multimap.h Fix uses of static_assert not guarded by C++11 check 2019-06-03 23:18:31 +01:00
stl_multiset.h libstdc++: Fix declarations of variable templates 2019-11-19 09:34:59 +00:00
stl_numeric.h Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
stl_pair.h libstdc++: Implement spaceship for std::pair (P1614R2) 2019-12-03 23:57:46 +00:00
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h libstdc++: Fix declarations of variable templates 2019-11-19 09:34:59 +00:00
stl_stack.h
stl_tempbuf.h stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. 2019-07-19 21:14:41 +00:00
stl_tree.h PR libstdc++/85965 move is_invocable assertions again 2019-05-17 15:13:32 +01:00
stl_uninitialized.h PR c++/91369 Implement P0784R7 changes to allocation and construction 2019-10-23 18:42:11 +01:00
stl_vector.h PR libstdc++/92124 fix incorrect container move assignment 2019-10-17 15:21:27 +01:00
stream_iterator.h Fix non-standard behaviour of std::istream_iterator 2019-06-19 23:57:10 +01:00
streambuf_iterator.h Apply C++20 changes to various iterator types 2019-10-30 15:48:11 +00:00
streambuf.tcc
string_view.tcc
stringfwd.h
uniform_int_dist.h
unique_lock.h Improve docs for mutexes 2019-05-02 16:46:42 +01:00
unique_ptr.h PR libstdc++/91308 fix constraints on unique_ptr assignment 2019-07-31 15:38:26 +01:00
unordered_map.h
unordered_set.h libstdc++: Fix declarations of variable templates 2019-11-19 09:34:59 +00:00
uses_allocator.h Repair the <tuple> part of C++20 p1032 Misc constexpr bits. 2019-11-17 03:31:15 +00:00
valarray_after.h
valarray_array.h
valarray_array.tcc
valarray_before.h
vector.tcc