[libcxx-commits] [PATCH] D127230: [libc++][NFC] Simplify enable_if for std::copy optimization
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 8 09:46:23 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7611eb4869db: [libc++][NFC] Simplify enable_if for std::copy optimization (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127230/new/
https://reviews.llvm.org/D127230
Files:
libcxx/include/__algorithm/copy.h
Index: libcxx/include/__algorithm/copy.h
===================================================================
--- libcxx/include/__algorithm/copy.h
+++ libcxx/include/__algorithm/copy.h
@@ -56,16 +56,11 @@
return std::make_pair(__first + __n, __result + __n);
}
-template <class _Iter>
-using __is_trivially_copy_assignable_unwrapped =
- _And<__is_cpp17_contiguous_iterator<_Iter>, is_trivially_copy_assignable<__iter_value_type<_Iter> > >;
-
-template <class _InIter,
- class _OutIter,
- class = __enable_if_t<is_same<typename remove_const<typename iterator_traits<_InIter>::value_type>::type,
- typename iterator_traits<_OutIter>::value_type>::value
- && __is_trivially_copy_assignable_unwrapped<_InIter>::value
- && __is_trivially_copy_assignable_unwrapped<_OutIter>::value> >
+template <class _InIter, class _OutIter,
+ __enable_if_t<is_same<typename remove_const<__iter_value_type<_InIter> >::type, __iter_value_type<_OutIter> >::value
+ && __is_cpp17_contiguous_iterator<_InIter>::value
+ && __is_cpp17_contiguous_iterator<_OutIter>::value
+ && is_trivially_copy_assignable<__iter_value_type<_OutIter> >::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
pair<reverse_iterator<_InIter>, reverse_iterator<_OutIter> >
__copy_impl(reverse_iterator<_InIter> __first,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127230.435220.patch
Type: text/x-patch
Size: 1491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220608/0faa4ea6/attachment.bin>
More information about the libcxx-commits
mailing list