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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| algorithmfwd.h | Loading commit data... | |
| alloc_traits.h | Loading commit data... | |
| allocated_ptr.h | Loading commit data... | |
| allocator.h | Loading commit data... | |
| atomic_base.h | Loading commit data... | |
| atomic_futex.h | Loading commit data... | |
| basic_ios.h | Loading commit data... | |
| basic_ios.tcc | Loading commit data... | |
| basic_string.h | Loading commit data... | |
| basic_string.tcc | Loading commit data... | |
| boost_concept_check.h | Loading commit data... | |
| c++0x_warning.h | Loading commit data... | |
| c++config | Loading commit data... | |
| char_traits.h | Loading commit data... | |
| charconv.h | Loading commit data... | |
| codecvt.h | Loading commit data... | |
| concept_check.h | Loading commit data... | |
| cpp_type_traits.h | Loading commit data... | |
| deque.tcc | Loading commit data... | |
| enable_special_members.h | Loading commit data... | |
| erase_if.h | Loading commit data... | |
| forward_list.h | Loading commit data... | |
| forward_list.tcc | Loading commit data... | |
| fs_dir.h | Loading commit data... | |
| fs_fwd.h | Loading commit data... | |
| fs_ops.h | Loading commit data... | |
| fs_path.h | Loading commit data... | |
| fstream.tcc | Loading commit data... | |
| functexcept.h | Loading commit data... | |
| functional_hash.h | Loading commit data... | |
| gslice.h | Loading commit data... | |
| gslice_array.h | Loading commit data... | |
| hashtable.h | Loading commit data... | |
| hashtable_policy.h | Loading commit data... | |
| indirect_array.h | Loading commit data... | |
| invoke.h | Loading commit data... | |
| ios_base.h | Loading commit data... | |
| istream.tcc | Loading commit data... | |
| iterator_concepts.h | Loading commit data... | |
| list.tcc | Loading commit data... | |
| locale_classes.h | Loading commit data... | |
| locale_classes.tcc | Loading commit data... | |
| locale_conv.h | Loading commit data... | |
| locale_facets.h | Loading commit data... | |
| locale_facets.tcc | Loading commit data... | |
| locale_facets_nonio.h | Loading commit data... | |
| locale_facets_nonio.tcc | Loading commit data... | |
| localefwd.h | Loading commit data... | |
| mask_array.h | Loading commit data... | |
| memoryfwd.h | Loading commit data... | |
| move.h | Loading commit data... | |
| node_handle.h | Loading commit data... | |
| ostream.tcc | Loading commit data... | |
| ostream_insert.h | Loading commit data... | |
| parse_numbers.h | Loading commit data... | |
| postypes.h | Loading commit data... | |
| predefined_ops.h | Loading commit data... | |
| ptr_traits.h | Loading commit data... | |
| quoted_string.h | Loading commit data... | |
| random.h | Loading commit data... | |
| random.tcc | Loading commit data... | |
| range_access.h | Loading commit data... | |
| range_cmp.h | Loading commit data... | |
| refwrap.h | Loading commit data... | |
| regex.h | Loading commit data... | |
| regex.tcc | Loading commit data... | |
| regex_automaton.h | Loading commit data... | |
| regex_automaton.tcc | Loading commit data... | |
| regex_compiler.h | Loading commit data... | |
| regex_compiler.tcc | Loading commit data... | |
| regex_constants.h | Loading commit data... | |
| regex_error.h | Loading commit data... | |
| regex_executor.h | Loading commit data... | |
| regex_executor.tcc | Loading commit data... | |
| regex_scanner.h | Loading commit data... | |
| regex_scanner.tcc | Loading commit data... | |
| shared_ptr.h | Loading commit data... | |
| shared_ptr_atomic.h | Loading commit data... | |
| shared_ptr_base.h | Loading commit data... | |
| slice_array.h | Loading commit data... | |
| specfun.h | Loading commit data... | |
| sstream.tcc | Loading commit data... | |
| std_abs.h | Loading commit data... | |
| std_function.h | Loading commit data... | |
| std_mutex.h | Loading commit data... | |
| stl_algo.h | Loading commit data... | |
| stl_algobase.h | Loading commit data... | |
| stl_bvector.h | Loading commit data... | |
| stl_construct.h | Loading commit data... | |
| stl_deque.h | Loading commit data... | |
| stl_function.h | Loading commit data... | |
| stl_heap.h | Loading commit data... | |
| stl_iterator.h | Loading commit data... | |
| stl_iterator_base_funcs.h | Loading commit data... | |
| stl_iterator_base_types.h | Loading commit data... | |
| stl_list.h | Loading commit data... | |
| stl_map.h | Loading commit data... | |
| stl_multimap.h | Loading commit data... | |
| stl_multiset.h | Loading commit data... | |
| stl_numeric.h | Loading commit data... | |
| stl_pair.h | Loading commit data... | |
| stl_queue.h | Loading commit data... | |
| stl_raw_storage_iter.h | Loading commit data... | |
| stl_relops.h | Loading commit data... | |
| stl_set.h | Loading commit data... | |
| stl_stack.h | Loading commit data... | |
| stl_tempbuf.h | Loading commit data... | |
| stl_tree.h | Loading commit data... | |
| stl_uninitialized.h | Loading commit data... | |
| stl_vector.h | Loading commit data... | |
| stream_iterator.h | Loading commit data... | |
| streambuf.tcc | Loading commit data... | |
| streambuf_iterator.h | Loading commit data... | |
| string_view.tcc | Loading commit data... | |
| stringfwd.h | Loading commit data... | |
| uniform_int_dist.h | Loading commit data... | |
| unique_lock.h | Loading commit data... | |
| unique_ptr.h | Loading commit data... | |
| unordered_map.h | Loading commit data... | |
| unordered_set.h | Loading commit data... | |
| uses_allocator.h | Loading commit data... | |
| valarray_after.h | Loading commit data... | |
| valarray_array.h | Loading commit data... | |
| valarray_array.tcc | Loading commit data... | |
| valarray_before.h | Loading commit data... | |
| vector.tcc | Loading commit data... |