Skip to content

Commit

Permalink
Update libcxx to 2 Apr 2024 239236b8c2154aa49e98bc7ed774a7d2712edf50
Browse files Browse the repository at this point in the history
```
[libc++] Remove pair dependency (#85621)
[libc++] Simplify the implementation of <stddef.h> (#86843)
Update the "Current Status" section of the website to be current. (#84507)
[libc++] Optimize the two range overload of mismatch (#86853)
[libc++] Refactor __tuple_like and __pair_like (#85206)
[libc++][test] Improves src include paths. (#86864)
[libc++] Document guidelines for applying [[nodiscard]] (#84000)
[libc++] Optimize the std::mismatch tail (#83440)
[libc++] Remove <queue> and <stack> includes from <format> (#85520)
[libc++] Switch FreeBSD to C++26 (#86658)
[libc++] Fix one case in saturate_cast.pass.cpp for 64-bit on z/OS (#86724)
[libc++][test] Remove tests that testing std::variant<T&> (#84222)
[libc++] <experimental/simd> Reduce types for template parameter U in tests (#83781)
[libc++] Switch FreeBSD CI job to Clang 17 (#86320)
[libc++][CI] Updates the documentation. (#85264)
[libc++][format] Adds ABI tags to inline constexpr variables. (#86293)
[libc++][test] Fix race condition in condition_variable_any tests (#84788)
[libc++] Vectorize mismatch (#73255)
[libc++] Don't push and pop extensions diagnostics when using clang modules (#85917)
[libc++][ranges] use `static operator()` for C++23 ranges (#86052)
[libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (#85263)
[libc++] Remove macros for keeping std::allocator members and void specialization after C++20 (#85806)
[libc++] Deprecates std::errc constants. (#80542)
[libcxx] [cmake] Fix cmake_path(ABSOLUTE_PATH) for empty CMAKE_INSTALL_PREFIX
[libc++][CI] Reenables the module tests. (#85799)
[libc++][ranges] remove `__workaround_52970` (#85683)
[libc++][ranges] LWG3715: `view_interface::empty` is overconstrained (#85004)
[libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (#85756)
[libc++][format] Fixes nested concept evaluation. (#85548)
[libc++][CMake] Removes LIBCXX_ENABLE_CLANG_TIDY. (#85262)
[libc++] Remove __unconstrained_reverse_iterator (#85582)
[libc++] Simplify the implementation of remove_reference (#85207)
[libcxx][test] Create feature host-can-create-symlinks (#82204)
[libc++] Use __is_scoped_enum for the implementation of is_scoped_enum if it's available (#85580)
[libc++] Add missing hide-from-ABI annotations on virtual functions (#85439)
[libc++] Optimize ranges::fill{,_n} for vector<bool>::iterator (#84642)
[libc++] Add <locale> include in <chrono> (#85521)
[libc++] Remove <locale> includes from <format> (#85478)
[libc++] P2602R2 Poison Pills are Too Toxic (#74534)
[libc++] Fixes run-buildbot-container. (#84644)
[libc++] Add [[nodiscard]] to static numeric limit functions (#83748)
 Rework Modules CMake to be (more) idiomatic. (#84936)
[libc++] Enables TZDB tests. (#82108)
[libc++] Remove a few includes from <__functional/hash.h> (#83254)
[libc++] Implements filebuf unbuffered. (#76629)
[libc++][CI] Updates the version number of the latest release.
[libc++] Remove <tuple> include from <__format/concepts.h> (#80214)
[runtimes] Prefer -fvisibility-global-new-delete=force-hidden (#84917)
[libc++] Fix tests on musl (#85085)
[libc++] Remove _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT (#83928)
[libcxx] Fix incorrect type in the has-1024-bit-atomics feature test (#84904)
[libc++] Improves UB handling in ios_base destructor. (#76525)
[libc++][CI] Installs tzdata package in Docker. (#84643)
[libc++][TZDB] Fixes parsing interleaved rules. (#84808)
[libc++][hardening] Check bounds on arithmetic in __bounded_iter (#78876)
[libc++][hardening] Add iterator validity checks on unordered containers (#80230)
[libc++][hardening] Reclassify string_view(ptr, len)'s size assertion (#79297)
[libc++] Re-enable the clang_modules_include test for Objective-C++ (#66801)
[libc++] Remove XFAIL for SIMD in optimized build (#84767)
[libcxx] Update 128-bit-atomics feature test (#83841)
[libc++] Only forward-declare ABI-functions in exception_ptr.h if they are meant to be used (#84707)
[libc++][test] Don't include `test_format_context.h` in `parse.pass.cpp` (#83734)
[libc++] Add missing include in test (#84579)
[libc++] Remove <tuple> from <variant> (#83183)
[RFC][libc++] Reworks clang-tidy selection. (#81362)
[libc++] Remove <array> include from <span> (#83742)
[libc++][format] Updates LWG3462 status. (#80550)
[libc++][format] Update LWG3701 status. (#80545)
[libc++][test] Fix MSVC warning C4127 in `array.cons/initialization.pass.cpp` (#79793)
[libc++] Simplify the std::pair constructor overload set (#81448)
[libc++] Allow the use of extensions in the implementation (#79532)
[libc++] Don't build against libcxxrt by default on FreeBSD (#84484)
Actually disable the module generation tests.
[libc++] Disable module_std and module_std_compat tests
[libc++] Enable availability based on the compiler instead of __has_extension (#84065)
[libc++] Fixes time formatter test output for Linux on PowerPC (#75526)
[libc++] Remove unused includes from __type_traits/is_convertible.h (#83747)
```
commit_hash:171258d93ab92f516dfb1789300677a164e63219
  • Loading branch information
4JustMe4 committed Feb 1, 2025
1 parent 8c5910b commit f82b747
Show file tree
Hide file tree
Showing 187 changed files with 1,603 additions and 1,754 deletions.
26 changes: 9 additions & 17 deletions build/sysincl/stl-to-libcxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@
- __algorithm/shift_right.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h
- __algorithm/shuffle.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h
- __algorithm/sift_down.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
- __algorithm/simd_utils.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/simd_utils.h
- __algorithm/sort.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h
- __algorithm/sort_heap.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h
- __algorithm/stable_partition.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h
Expand Down Expand Up @@ -577,7 +578,6 @@
- __format/format_context.h: contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
- __format/format_error.h: contrib/libs/cxxsupp/libcxx/include/__format/format_error.h
- __format/format_functions.h: contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h
- __format/format_fwd.h: contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
- __format/format_parse_context.h: contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
- __format/format_string.h: contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
- __format/format_to_n_result.h: contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
Expand Down Expand Up @@ -627,21 +627,27 @@
- __fwd/array.h: contrib/libs/cxxsupp/libcxx/include/__fwd/array.h
- __fwd/bit_reference.h: contrib/libs/cxxsupp/libcxx/include/__fwd/bit_reference.h
- __fwd/complex.h: contrib/libs/cxxsupp/libcxx/include/__fwd/complex.h
- __fwd/deque.h: contrib/libs/cxxsupp/libcxx/include/__fwd/deque.h
- __fwd/format.h: contrib/libs/cxxsupp/libcxx/include/__fwd/format.h
- __fwd/fstream.h: contrib/libs/cxxsupp/libcxx/include/__fwd/fstream.h
- __fwd/functional.h: contrib/libs/cxxsupp/libcxx/include/__fwd/functional.h
- __fwd/ios.h: contrib/libs/cxxsupp/libcxx/include/__fwd/ios.h
- __fwd/istream.h: contrib/libs/cxxsupp/libcxx/include/__fwd/istream.h
- __fwd/mdspan.h: contrib/libs/cxxsupp/libcxx/include/__fwd/mdspan.h
- __fwd/memory.h: contrib/libs/cxxsupp/libcxx/include/__fwd/memory.h
- __fwd/memory_resource.h: contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h
- __fwd/ostream.h: contrib/libs/cxxsupp/libcxx/include/__fwd/ostream.h
- __fwd/pair.h: contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h
- __fwd/queue.h: contrib/libs/cxxsupp/libcxx/include/__fwd/queue.h
- __fwd/span.h: contrib/libs/cxxsupp/libcxx/include/__fwd/span.h
- __fwd/sstream.h: contrib/libs/cxxsupp/libcxx/include/__fwd/sstream.h
- __fwd/stack.h: contrib/libs/cxxsupp/libcxx/include/__fwd/stack.h
- __fwd/streambuf.h: contrib/libs/cxxsupp/libcxx/include/__fwd/streambuf.h
- __fwd/string.h: contrib/libs/cxxsupp/libcxx/include/__fwd/string.h
- __fwd/string_view.h: contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h
- __fwd/subrange.h: contrib/libs/cxxsupp/libcxx/include/__fwd/subrange.h
- __fwd/tuple.h: contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h
- __fwd/vector.h: contrib/libs/cxxsupp/libcxx/include/__fwd/vector.h
- __ios/fpos.h: contrib/libs/cxxsupp/libcxx/include/__ios/fpos.h
- __iterator/access.h: contrib/libs/cxxsupp/libcxx/include/__iterator/access.h
- __iterator/advance.h: contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
Expand Down Expand Up @@ -892,13 +898,14 @@
- __thread/this_thread.h: contrib/libs/cxxsupp/libcxx/include/__thread/this_thread.h
- __thread/thread.h: contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
- __thread/timed_backoff_policy.h: contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
- __tuple/find_index.h: contrib/libs/cxxsupp/libcxx/include/__tuple/find_index.h
- __tuple/make_tuple_types.h: contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h
- __tuple/pair_like.h: contrib/libs/cxxsupp/libcxx/include/__tuple/pair_like.h
- __tuple/sfinae_helpers.h: contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h
- __tuple/tuple_element.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h
- __tuple/tuple_indices.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h
- __tuple/tuple_like.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h
- __tuple/tuple_like_ext.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like_ext.h
- __tuple/tuple_like_no_subrange.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like_no_subrange.h
- __tuple/tuple_size.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h
- __tuple/tuple_types.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h
- __type_traits/add_const.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/add_const.h
Expand Down Expand Up @@ -945,10 +952,7 @@
- __type_traits/is_constant_evaluated.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h
- __type_traits/is_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h
- __type_traits/is_convertible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h
- __type_traits/is_copy_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h
- __type_traits/is_copy_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h
- __type_traits/is_core_convertible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_core_convertible.h
- __type_traits/is_default_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h
- __type_traits/is_destructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h
- __type_traits/is_empty.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_empty.h
- __type_traits/is_enum.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h
Expand All @@ -964,17 +968,10 @@
- __type_traits/is_member_function_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h
- __type_traits/is_member_object_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h
- __type_traits/is_member_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h
- __type_traits/is_move_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h
- __type_traits/is_move_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h
- __type_traits/is_nothrow_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h
- __type_traits/is_nothrow_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h
- __type_traits/is_nothrow_convertible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_convertible.h
- __type_traits/is_nothrow_copy_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
- __type_traits/is_nothrow_copy_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
- __type_traits/is_nothrow_default_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h
- __type_traits/is_nothrow_destructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h
- __type_traits/is_nothrow_move_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h
- __type_traits/is_nothrow_move_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h
- __type_traits/is_null_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h
- __type_traits/is_object.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_object.h
- __type_traits/is_pod.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h
Expand All @@ -995,14 +992,9 @@
- __type_traits/is_trivial.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h
- __type_traits/is_trivially_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h
- __type_traits/is_trivially_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h
- __type_traits/is_trivially_copy_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h
- __type_traits/is_trivially_copy_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h
- __type_traits/is_trivially_copyable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h
- __type_traits/is_trivially_default_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h
- __type_traits/is_trivially_destructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h
- __type_traits/is_trivially_lexicographically_comparable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_lexicographically_comparable.h
- __type_traits/is_trivially_move_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h
- __type_traits/is_trivially_move_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h
- __type_traits/is_trivially_relocatable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_relocatable.h
- __type_traits/is_unbounded_array.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unbounded_array.h
- __type_traits/is_union.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h
Expand Down
6 changes: 2 additions & 4 deletions contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ template <class, class _InIter, class _Sent, class _OutIter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);

template <class _AlgPolicy>
struct __copy_loop {
struct __copy_impl {
template <class _InIter, class _Sent, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
operator()(_InIter __first, _Sent __last, _OutIter __result) const {
Expand Down Expand Up @@ -94,9 +94,7 @@ struct __copy_loop {
__local_first = _Traits::__begin(++__segment_iterator);
}
}
};

struct __copy_trivial {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
Expand All @@ -108,7 +106,7 @@ struct __copy_trivial {
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__copy(_InIter __first, _Sent __last, _OutIter __result) {
return std::__dispatch_copy_or_move<_AlgPolicy, __copy_loop<_AlgPolicy>, __copy_trivial>(
return std::__copy_move_unwrap_iters<__copy_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <__config>
#include <__iterator/segmented_iterator.h>
#include <__type_traits/common_type.h>
#include <__type_traits/is_copy_constructible.h>
#include <__type_traits/is_constructible.h>
#include <__utility/move.h>
#include <__utility/pair.h>

Expand All @@ -33,7 +33,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InIter, _OutIter>
__copy_backward(_InIter __first, _Sent __last, _OutIter __result);

template <class _AlgPolicy>
struct __copy_backward_loop {
struct __copy_backward_impl {
template <class _InIter, class _Sent, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
operator()(_InIter __first, _Sent __last, _OutIter __result) const {
Expand Down Expand Up @@ -104,9 +104,7 @@ struct __copy_backward_loop {
__local_last = _Traits::__end(__segment_iterator);
}
}
};

struct __copy_backward_trivial {
// At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
template <class _In, class _Out, __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
Expand All @@ -118,7 +116,7 @@ struct __copy_backward_trivial {
template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
__copy_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
return std::__dispatch_copy_or_move<_AlgPolicy, __copy_backward_loop<_AlgPolicy>, __copy_backward_trivial>(
return std::__copy_move_unwrap_iters<__copy_backward_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}

Expand Down
41 changes: 8 additions & 33 deletions contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <__type_traits/enable_if.h>
#include <__type_traits/is_always_bitcastable.h>
#include <__type_traits/is_constant_evaluated.h>
#include <__type_traits/is_copy_constructible.h>
#include <__type_traits/is_constructible.h>
#include <__type_traits/is_trivially_assignable.h>
#include <__type_traits/is_trivially_copyable.h>
#include <__type_traits/is_volatile.h>
Expand Down Expand Up @@ -81,30 +81,17 @@ __copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {

// Iterator unwrapping and dispatching to the correct overload.

template <class _F1, class _F2>
struct __overload : _F1, _F2 {
using _F1::operator();
using _F2::operator();
};

template <class _InIter, class _Sent, class _OutIter, class = void>
struct __can_rewrap : false_type {};

template <class _InIter, class _Sent, class _OutIter>
struct __can_rewrap<_InIter,
_Sent,
_OutIter,
// Note that sentinels are always copy-constructible.
__enable_if_t< is_copy_constructible<_InIter>::value && is_copy_constructible<_OutIter>::value > >
: true_type {};
template <class _InIter, class _OutIter>
struct __can_rewrap
: integral_constant<bool, is_copy_constructible<_InIter>::value && is_copy_constructible<_OutIter>::value> {};

template <class _Algorithm,
class _InIter,
class _Sent,
class _OutIter,
__enable_if_t<__can_rewrap<_InIter, _Sent, _OutIter>::value, int> = 0>
__enable_if_t<__can_rewrap<_InIter, _OutIter>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__unwrap_and_dispatch(_InIter __first, _Sent __last, _OutIter __out_first) {
__copy_move_unwrap_iters(_InIter __first, _Sent __last, _OutIter __out_first) {
auto __range = std::__unwrap_range(__first, std::move(__last));
auto __result = _Algorithm()(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__out_first));
return std::make_pair(std::__rewrap_range<_Sent>(std::move(__first), std::move(__result.first)),
Expand All @@ -115,24 +102,12 @@ template <class _Algorithm,
class _InIter,
class _Sent,
class _OutIter,
__enable_if_t<!__can_rewrap<_InIter, _Sent, _OutIter>::value, int> = 0>
__enable_if_t<!__can_rewrap<_InIter, _OutIter>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__unwrap_and_dispatch(_InIter __first, _Sent __last, _OutIter __out_first) {
__copy_move_unwrap_iters(_InIter __first, _Sent __last, _OutIter __out_first) {
return _Algorithm()(std::move(__first), std::move(__last), std::move(__out_first));
}

template <class _AlgPolicy,
class _NaiveAlgorithm,
class _OptimizedAlgorithm,
class _InIter,
class _Sent,
class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__dispatch_copy_or_move(_InIter __first, _Sent __last, _OutIter __out_first) {
using _Algorithm = __overload<_NaiveAlgorithm, _OptimizedAlgorithm>;
return std::__unwrap_and_dispatch<_Algorithm>(std::move(__first), std::move(__last), std::move(__out_first));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS
Expand Down
Loading

0 comments on commit f82b747

Please sign in to comment.