-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[libc++][C++03] Remove macros that expand to nothing #134046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesPatch is 940.85 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/134046.diff 230 Files Affected:
diff --git a/libcxx/include/__cxx03/__algorithm/adjacent_find.h b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
index 6add0f3fe2b53..ac233233bbc74 100644
--- a/libcxx/include/__cxx03/__algorithm/adjacent_find.h
+++ b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
@@ -26,8 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
-__adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _Iter __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
if (__first == __last)
return __first;
_Iter __i = __first;
@@ -40,13 +39,13 @@ __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
}
template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
return std::adjacent_find(std::move(__first), std::move(__last), __equal_to());
}
diff --git a/libcxx/include/__cxx03/__algorithm/all_of.h b/libcxx/include/__cxx03/__algorithm/all_of.h
index fe46ee5fca43c..8bc39b027e40b 100644
--- a/libcxx/include/__cxx03/__algorithm/all_of.h
+++ b/libcxx/include/__cxx03/__algorithm/all_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/any_of.h b/libcxx/include/__cxx03/__algorithm/any_of.h
index 26bf3996e8a6f..6b3462a91a9f4 100644
--- a/libcxx/include/__cxx03/__algorithm/any_of.h
+++ b/libcxx/include/__cxx03/__algorithm/any_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__cxx03/__algorithm/binary_search.h b/libcxx/include/__cxx03/__algorithm/binary_search.h
index a72da8e396639..37e273944554c 100644
--- a/libcxx/include/__cxx03/__algorithm/binary_search.h
+++ b/libcxx/include/__cxx03/__algorithm/binary_search.h
@@ -22,14 +22,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
__first = std::lower_bound<_ForwardIterator, _Tp, __comp_ref_type<_Compare> >(__first, __last, __value, __comp);
return __first != __last && !__comp(__value, *__first);
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::binary_search(__first, __last, __value, __less<>());
}
diff --git a/libcxx/include/__cxx03/__algorithm/comp.h b/libcxx/include/__cxx03/__algorithm/comp.h
index 0c638b4e4a651..420c4344e0af7 100644
--- a/libcxx/include/__cxx03/__algorithm/comp.h
+++ b/libcxx/include/__cxx03/__algorithm/comp.h
@@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __equal_to {
template <class _T1, class _T2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _T1& __x, const _T2& __y) const {
return __x == __y;
}
};
@@ -36,7 +36,7 @@ struct __less {};
template <>
struct __less<void, void> {
template <class _Tp, class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
return __lhs < __rhs;
}
};
diff --git a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
index ab793da0ad293..bf4d07c89d123 100644
--- a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
@@ -22,10 +22,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare>
struct __debug_less {
_Compare& __comp_;
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI __debug_less(_Compare& __c) : __comp_(__c) {}
+ _LIBCPP_HIDE_FROM_ABI __debug_less(_Compare& __c) : __comp_(__c) {}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Up& __y) {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Up& __y) {
bool __r = __comp_(__x, __y);
if (__r)
__do_compare_assert(0, __y, __x);
@@ -33,7 +33,7 @@ struct __debug_less {
}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(_Tp& __x, _Up& __y) {
+ _LIBCPP_HIDE_FROM_ABI bool operator()(_Tp& __x, _Up& __y) {
bool __r = __comp_(__x, __y);
if (__r)
__do_compare_assert(0, __y, __x);
@@ -41,16 +41,15 @@ struct __debug_less {
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 inline
- _LIBCPP_HIDE_FROM_ABI decltype((void)std::declval<_Compare&>()(std::declval<_LHS&>(), std::declval<_RHS&>()))
- __do_compare_assert(int, _LHS& __l, _RHS& __r) {
+ inline _LIBCPP_HIDE_FROM_ABI decltype((void)std::declval<_Compare&>()(std::declval<_LHS&>(), std::declval<_RHS&>()))
+ __do_compare_assert(int, _LHS& __l, _RHS& __r) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering");
(void)__l;
(void)__r;
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {}
+ inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {}
};
// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference.
diff --git a/libcxx/include/__cxx03/__algorithm/copy.h b/libcxx/include/__cxx03/__algorithm/copy.h
index 2aa0ab78b7858..ab164a8f9af51 100644
--- a/libcxx/include/__cxx03/__algorithm/copy.h
+++ b/libcxx/include/__cxx03/__algorithm/copy.h
@@ -29,13 +29,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
+inline _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
template <class _AlgPolicy>
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 {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
while (__first != __last) {
*__result = *__first;
++__first;
@@ -51,18 +50,16 @@ struct __copy_impl {
_OutIter& __result_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit _CopySegment(_OutIter& __result)
- : __result_(__result) {}
+ _LIBCPP_HIDE_FROM_ABI explicit _CopySegment(_OutIter& __result) : __result_(__result) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+ _LIBCPP_HIDE_FROM_ABI void
operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
__result_ = std::__copy<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
}
};
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
std::__for_each_segment(__first, __last, _CopySegment<_InIter, _OutIter>(__result));
return std::make_pair(__last, std::move(__result));
}
@@ -72,8 +69,7 @@ struct __copy_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
using _DiffT = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
@@ -97,21 +93,19 @@ struct __copy_impl {
// 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*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_trivial_impl(__first, __last, __result);
}
};
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) {
+pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI __copy(_InIter __first, _Sent __last, _OutIter __result) {
return std::__copy_move_unwrap_iters<__copy_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
return std::__copy<_ClassicAlgPolicy>(__first, __last, __result).second;
}
diff --git a/libcxx/include/__cxx03/__algorithm/copy_backward.h b/libcxx/include/__cxx03/__algorithm/copy_backward.h
index 9262d13d6c175..0a84b6ed27a98 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_backward.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_backward.h
@@ -29,14 +29,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InIter, _OutIter>
-__copy_backward(_InIter __first, _Sent __last, _OutIter __result);
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> __copy_backward(_InIter __first, _Sent __last, _OutIter __result);
template <class _AlgPolicy>
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 {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
auto __last_iter = _IterOps<_AlgPolicy>::next(__first, __last);
auto __original_last_iter = __last_iter;
@@ -48,8 +46,7 @@ struct __copy_backward_impl {
}
template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_InIter>;
auto __sfirst = _Traits::__segment(__first);
auto __slast = _Traits::__segment(__last);
@@ -79,8 +76,7 @@ struct __copy_backward_impl {
__enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
!__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
- operator()(_InIter __first, _InIter __last, _OutIter __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter> operator()(_InIter __first, _InIter __last, _OutIter __result) const {
using _Traits = __segmented_iterator_traits<_OutIter>;
auto __orig_last = __last;
auto __segment_iterator = _Traits::__segment(__result);
@@ -107,21 +103,20 @@ struct __copy_backward_impl {
// 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*>
- operator()(_In* __first, _In* __last, _Out* __result) const {
+ _LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> operator()(_In* __first, _In* __last, _Out* __result) const {
return std::__copy_backward_trivial_impl(__first, __last, __result);
}
};
template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
+_LIBCPP_HIDE_FROM_ABI pair<_BidirectionalIterator1, _BidirectionalIterator2>
__copy_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
return std::__copy_move_unwrap_iters<__copy_backward_impl<_AlgPolicy> >(
std::move(__first), std::move(__last), std::move(__result));
}
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
+inline _LIBCPP_HIDE_FROM_ABI _BidirectionalIterator2
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
static_assert(std::is_copy_constructible<_BidirectionalIterator1>::value &&
std::is_copy_constructible<_BidirectionalIterator1>::value,
diff --git a/libcxx/include/__cxx03/__algorithm/copy_if.h b/libcxx/include/__cxx03/__algorithm/copy_if.h
index 2db0c26fb86be..53a85bc51d8ec 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_if.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) {
for (; __first != __last; ++__first) {
if (__pred(*__first)) {
diff --git a/libcxx/include/__cxx03/__algorithm/copy_move_common.h b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
index 637b5a01daa75..8d1ba8e39b8bc 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_move_common.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
@@ -58,8 +58,7 @@ struct __can_lower_move_assignment_to_memmove {
// `memmove` algorithms implementation.
template <class _In, class _Out>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
-__copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
+_LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> __copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
const size_t __n = static_cast<size_t>(__last - __first);
std::__constexpr_memmove(__result, __first, __element_count(__n));
@@ -68,8 +67,7 @@ __copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
}
template <class _In, class _Out>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
-__copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {
+_LIBCPP_HIDE_FROM_ABI pair<_In*, _Out*> __copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {
const size_t __n = static_cast<size_t>(__last - __first);
__result -= __n;
@@ -89,7 +87,7 @@ template <class _Algorithm,
class _Sent,
class _OutIter,
__enable_if_t<__can_rewrap<_InIter, _OutIter>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter>
__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));
@@ -102,7 +100,7 @@ template <class _Algorithm,
class _Sent,
class _OutIter,
__enable_if_t<!__can_rewrap<_InIter, _OutIter>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
+_LIBCPP_HIDE_FROM_ABI pair<_InIter, _OutIter>
__copy_move_unwrap_iters(_InIter __first, _Sent __last, _OutIter __out_first) {
return _Algorithm()(std::move(__first), std::move(__last), std::move(__out_first));
}
diff --git a/libcxx/include/__cxx03/__algorithm/copy_n.h b/libcxx/include/__cxx03/__algorithm/copy_n.h
index aedb232b1bd5e..b32b908d89585 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_n.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_n.h
@@ -27,8 +27,7 @@ template <class _InputIterator,
__enable_if_t<__has_input_iterator_category<_InputIterator>::value &&
!__has_random_access_iterator_category<_InputIterator>::value,
int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
if (__n > 0) {
@@ -47,8 +46,7 @@ template <class _InputIterator,
class _Size,
class _OutputIterator,
__enable_if_t<__has_random_access_iterator_category<_InputIterator>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
+inline _LIBCPP_HIDE_FROM_ABI _OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
diff --git a/libcxx/include/__cxx03/__algorithm/count.h b/libcxx/include/__cxx03/__algorithm/count.h
index 28cc28f76dd8f..5440fd031a1d3 100644
--- a/libcxx/include/__cxx03/__algorithm/count.h
+++ b/libcxx/include/__cxx03/__algorithm/count.h
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// generic implementation
template <class _AlgPolicy, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBC...
[truncated]
|
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions ,h -- libcxx/include/__cxx03/__algorithm/adjacent_find.h libcxx/include/__cxx03/__algorithm/all_of.h libcxx/include/__cxx03/__algorithm/any_of.h libcxx/include/__cxx03/__algorithm/binary_search.h libcxx/include/__cxx03/__algorithm/comp.h libcxx/include/__cxx03/__algorithm/comp_ref_type.h libcxx/include/__cxx03/__algorithm/copy.h libcxx/include/__cxx03/__algorithm/copy_backward.h libcxx/include/__cxx03/__algorithm/copy_if.h libcxx/include/__cxx03/__algorithm/copy_move_common.h libcxx/include/__cxx03/__algorithm/copy_n.h libcxx/include/__cxx03/__algorithm/count.h libcxx/include/__cxx03/__algorithm/count_if.h libcxx/include/__cxx03/__algorithm/equal.h libcxx/include/__cxx03/__algorithm/equal_range.h libcxx/include/__cxx03/__algorithm/fill.h libcxx/include/__cxx03/__algorithm/fill_n.h libcxx/include/__cxx03/__algorithm/find.h libcxx/include/__cxx03/__algorithm/find_end.h libcxx/include/__cxx03/__algorithm/find_first_of.h libcxx/include/__cxx03/__algorithm/find_if.h libcxx/include/__cxx03/__algorithm/find_if_not.h libcxx/include/__cxx03/__algorithm/find_segment_if.h libcxx/include/__cxx03/__algorithm/for_each.h libcxx/include/__cxx03/__algorithm/for_each_segment.h libcxx/include/__cxx03/__algorithm/generate.h libcxx/include/__cxx03/__algorithm/generate_n.h libcxx/include/__cxx03/__algorithm/half_positive.h libcxx/include/__cxx03/__algorithm/includes.h libcxx/include/__cxx03/__algorithm/is_heap.h libcxx/include/__cxx03/__algorithm/is_heap_until.h libcxx/include/__cxx03/__algorithm/is_partitioned.h libcxx/include/__cxx03/__algorithm/is_permutation.h libcxx/include/__cxx03/__algorithm/is_sorted.h libcxx/include/__cxx03/__algorithm/is_sorted_until.h libcxx/include/__cxx03/__algorithm/iter_swap.h libcxx/include/__cxx03/__algorithm/iterator_operations.h libcxx/include/__cxx03/__algorithm/lexicographical_compare.h libcxx/include/__cxx03/__algorithm/lower_bound.h libcxx/include/__cxx03/__algorithm/make_heap.h libcxx/include/__cxx03/__algorithm/make_projected.h libcxx/include/__cxx03/__algorithm/max.h libcxx/include/__cxx03/__algorithm/max_element.h libcxx/include/__cxx03/__algorithm/merge.h libcxx/include/__cxx03/__algorithm/min.h libcxx/include/__cxx03/__algorithm/min_element.h libcxx/include/__cxx03/__algorithm/minmax.h libcxx/include/__cxx03/__algorithm/minmax_element.h libcxx/include/__cxx03/__algorithm/mismatch.h libcxx/include/__cxx03/__algorithm/move.h libcxx/include/__cxx03/__algorithm/move_backward.h libcxx/include/__cxx03/__algorithm/next_permutation.h libcxx/include/__cxx03/__algorithm/none_of.h libcxx/include/__cxx03/__algorithm/nth_element.h libcxx/include/__cxx03/__algorithm/partial_sort.h libcxx/include/__cxx03/__algorithm/partial_sort_copy.h libcxx/include/__cxx03/__algorithm/partition.h libcxx/include/__cxx03/__algorithm/partition_copy.h libcxx/include/__cxx03/__algorithm/partition_point.h libcxx/include/__cxx03/__algorithm/pop_heap.h libcxx/include/__cxx03/__algorithm/prev_permutation.h libcxx/include/__cxx03/__algorithm/push_heap.h libcxx/include/__cxx03/__algorithm/remove.h libcxx/include/__cxx03/__algorithm/remove_copy.h libcxx/include/__cxx03/__algorithm/remove_copy_if.h libcxx/include/__cxx03/__algorithm/remove_if.h libcxx/include/__cxx03/__algorithm/replace.h libcxx/include/__cxx03/__algorithm/replace_copy.h libcxx/include/__cxx03/__algorithm/replace_copy_if.h libcxx/include/__cxx03/__algorithm/replace_if.h libcxx/include/__cxx03/__algorithm/reverse.h libcxx/include/__cxx03/__algorithm/reverse_copy.h libcxx/include/__cxx03/__algorithm/rotate.h libcxx/include/__cxx03/__algorithm/rotate_copy.h libcxx/include/__cxx03/__algorithm/search.h libcxx/include/__cxx03/__algorithm/search_n.h libcxx/include/__cxx03/__algorithm/set_difference.h libcxx/include/__cxx03/__algorithm/set_intersection.h libcxx/include/__cxx03/__algorithm/set_symmetric_difference.h libcxx/include/__cxx03/__algorithm/set_union.h libcxx/include/__cxx03/__algorithm/shuffle.h libcxx/include/__cxx03/__algorithm/sift_down.h libcxx/include/__cxx03/__algorithm/sort.h libcxx/include/__cxx03/__algorithm/sort_heap.h libcxx/include/__cxx03/__algorithm/swap_ranges.h libcxx/include/__cxx03/__algorithm/transform.h libcxx/include/__cxx03/__algorithm/unique.h libcxx/include/__cxx03/__algorithm/unique_copy.h libcxx/include/__cxx03/__algorithm/unwrap_iter.h libcxx/include/__cxx03/__algorithm/unwrap_range.h libcxx/include/__cxx03/__algorithm/upper_bound.h libcxx/include/__cxx03/__atomic/atomic.h libcxx/include/__cxx03/__atomic/atomic_base.h libcxx/include/__cxx03/__atomic/atomic_flag.h libcxx/include/__cxx03/__atomic/cxx_atomic_impl.h libcxx/include/__cxx03/__atomic/to_gcc_order.h libcxx/include/__cxx03/__bit/blsr.h libcxx/include/__cxx03/__bit/countl.h libcxx/include/__cxx03/__bit/countr.h libcxx/include/__cxx03/__bit/invert_if.h libcxx/include/__cxx03/__bit/popcount.h libcxx/include/__cxx03/__bit/rotate.h libcxx/include/__cxx03/__bit_reference libcxx/include/__cxx03/__chrono/duration.h libcxx/include/__cxx03/__chrono/steady_clock.h libcxx/include/__cxx03/__chrono/system_clock.h libcxx/include/__cxx03/__chrono/time_point.h libcxx/include/__cxx03/__condition_variable/condition_variable.h libcxx/include/__cxx03/__config libcxx/include/__cxx03/__debug_utils/randomize_range.h libcxx/include/__cxx03/__debug_utils/sanitizers.h libcxx/include/__cxx03/__debug_utils/strict_weak_ordering_check.h libcxx/include/__cxx03/__functional/binary_function.h libcxx/include/__cxx03/__functional/binary_negate.h libcxx/include/__cxx03/__functional/binder1st.h libcxx/include/__cxx03/__functional/binder2nd.h libcxx/include/__cxx03/__functional/identity.h libcxx/include/__cxx03/__functional/mem_fn.h libcxx/include/__cxx03/__functional/mem_fun_ref.h libcxx/include/__cxx03/__functional/operations.h libcxx/include/__cxx03/__functional/pointer_to_binary_function.h libcxx/include/__cxx03/__functional/pointer_to_unary_function.h libcxx/include/__cxx03/__functional/reference_wrapper.h libcxx/include/__cxx03/__functional/unary_function.h libcxx/include/__cxx03/__functional/unary_negate.h libcxx/include/__cxx03/__functional/weak_result_type.h libcxx/include/__cxx03/__fwd/array.h libcxx/include/__cxx03/__fwd/pair.h libcxx/include/__cxx03/__hash_table libcxx/include/__cxx03/__iterator/access.h libcxx/include/__cxx03/__iterator/advance.h libcxx/include/__cxx03/__iterator/back_insert_iterator.h libcxx/include/__cxx03/__iterator/bounded_iter.h libcxx/include/__cxx03/__iterator/distance.h libcxx/include/__cxx03/__iterator/front_insert_iterator.h libcxx/include/__cxx03/__iterator/insert_iterator.h libcxx/include/__cxx03/__iterator/istream_iterator.h libcxx/include/__cxx03/__iterator/istreambuf_iterator.h libcxx/include/__cxx03/__iterator/iterator.h libcxx/include/__cxx03/__iterator/move_iterator.h libcxx/include/__cxx03/__iterator/next.h libcxx/include/__cxx03/__iterator/prev.h libcxx/include/__cxx03/__iterator/reverse_iterator.h libcxx/include/__cxx03/__iterator/wrap_iter.h libcxx/include/__cxx03/__locale libcxx/include/__cxx03/__math/traits.h libcxx/include/__cxx03/__memory/addressof.h libcxx/include/__cxx03/__memory/allocate_at_least.h libcxx/include/__cxx03/__memory/allocator.h libcxx/include/__cxx03/__memory/allocator_traits.h libcxx/include/__cxx03/__memory/assume_aligned.h libcxx/include/__cxx03/__memory/auto_ptr.h libcxx/include/__cxx03/__memory/builtin_new_allocator.h libcxx/include/__cxx03/__memory/compressed_pair.h libcxx/include/__cxx03/__memory/construct_at.h libcxx/include/__cxx03/__memory/pointer_traits.h libcxx/include/__cxx03/__memory/raw_storage_iterator.h libcxx/include/__cxx03/__memory/shared_ptr.h libcxx/include/__cxx03/__memory/swap_allocator.h libcxx/include/__cxx03/__memory/temp_value.h libcxx/include/__cxx03/__memory/temporary_buffer.h libcxx/include/__cxx03/__memory/uninitialized_algorithms.h libcxx/include/__cxx03/__memory/unique_ptr.h libcxx/include/__cxx03/__memory/voidify.h libcxx/include/__cxx03/__mutex/mutex.h libcxx/include/__cxx03/__mutex/once_flag.h libcxx/include/__cxx03/__numeric/accumulate.h libcxx/include/__cxx03/__numeric/adjacent_difference.h libcxx/include/__cxx03/__numeric/inner_product.h libcxx/include/__cxx03/__numeric/iota.h libcxx/include/__cxx03/__numeric/partial_sum.h libcxx/include/__cxx03/__random/clamp_to_integral.h libcxx/include/__cxx03/__random/discard_block_engine.h libcxx/include/__cxx03/__random/independent_bits_engine.h libcxx/include/__cxx03/__random/is_seed_sequence.h libcxx/include/__cxx03/__random/linear_congruential_engine.h libcxx/include/__cxx03/__random/mersenne_twister_engine.h libcxx/include/__cxx03/__random/random_device.h libcxx/include/__cxx03/__random/shuffle_order_engine.h libcxx/include/__cxx03/__random/subtract_with_carry_engine.h libcxx/include/__cxx03/__random/uniform_int_distribution.h libcxx/include/__cxx03/__split_buffer libcxx/include/__cxx03/__string/char_traits.h libcxx/include/__cxx03/__string/constexpr_c_functions.h libcxx/include/__cxx03/__system_error/error_category.h libcxx/include/__cxx03/__thread/poll_with_backoff.h libcxx/include/__cxx03/__thread/this_thread.h libcxx/include/__cxx03/__tree libcxx/include/__cxx03/__type_traits/aligned_storage.h libcxx/include/__cxx03/__type_traits/aligned_union.h libcxx/include/__cxx03/__type_traits/integral_constant.h libcxx/include/__cxx03/__type_traits/invoke.h libcxx/include/__cxx03/__type_traits/is_constant_evaluated.h libcxx/include/__cxx03/__type_traits/is_literal_type.h libcxx/include/__cxx03/__type_traits/is_swappable.h libcxx/include/__cxx03/__type_traits/result_of.h libcxx/include/__cxx03/__utility/convert_to_integral.h libcxx/include/__cxx03/__utility/exception_guard.h libcxx/include/__cxx03/__utility/forward.h libcxx/include/__cxx03/__utility/is_pointer_in_range.h libcxx/include/__cxx03/__utility/is_valid_range.h libcxx/include/__cxx03/__utility/move.h libcxx/include/__cxx03/__utility/no_destroy.h libcxx/include/__cxx03/__utility/pair.h libcxx/include/__cxx03/__utility/rel_ops.h libcxx/include/__cxx03/__utility/swap.h libcxx/include/__cxx03/array libcxx/include/__cxx03/bitset libcxx/include/__cxx03/cmath libcxx/include/__cxx03/codecvt libcxx/include/__cxx03/complex libcxx/include/__cxx03/cwchar libcxx/include/__cxx03/deque libcxx/include/__cxx03/forward_list libcxx/include/__cxx03/limits libcxx/include/__cxx03/list libcxx/include/__cxx03/locale libcxx/include/__cxx03/map libcxx/include/__cxx03/new libcxx/include/__cxx03/queue libcxx/include/__cxx03/ratio libcxx/include/__cxx03/regex libcxx/include/__cxx03/set libcxx/include/__cxx03/stack libcxx/include/__cxx03/string libcxx/include/__cxx03/string_view libcxx/include/__cxx03/typeinfo libcxx/include/__cxx03/unordered_map libcxx/include/__cxx03/unordered_set libcxx/include/__cxx03/vector View the diff from clang-format here.diff --git a/libcxx/include/__cxx03/vector b/libcxx/include/__cxx03/vector
index 51a591d73..8192ffc1a 100644
--- a/libcxx/include/__cxx03/vector
+++ b/libcxx/include/__cxx03/vector
@@ -1105,8 +1105,7 @@ void vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __la
template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI void
-vector<_Tp, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
+_LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
clear();
for (; __first != __last; ++__first)
emplace_back(*__first);
@@ -1658,7 +1657,7 @@ public:
_LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n);
_LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __v);
- _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __v, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __v, const allocator_type& __a);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
@@ -2229,8 +2228,8 @@ vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __fir
template <class _Allocator>
template <class _InputIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator vector<bool, _Allocator>::__insert_with_sentinel(
- const_iterator __position, _InputIterator __first, _Sentinel __last) {
+_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
+vector<bool, _Allocator>::__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last) {
difference_type __off = __position - begin();
iterator __p = __const_iterator_cast(__position);
iterator __old_end = end();
@@ -2270,8 +2269,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
template <class _Allocator>
template <class _ForwardIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator
-vector<bool, _Allocator>::__insert_with_size(
+_LIBCPP_HIDE_FROM_ABI typename vector<bool, _Allocator>::iterator vector<bool, _Allocator>::__insert_with_size(
const_iterator __position, _ForwardIterator __first, _Sentinel __last, difference_type __n_signed) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__n_signed >= 0, "invalid range specified");
const size_type __n = static_cast<size_type>(__n_signed);
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about commit message, please make it self-standing.
f34c3f3
to
92d6777
Compare
15a8901
to
737b850
Compare
d95f1ff
to
3840d21
Compare
737b850
to
3df4ac1
Compare
3840d21
to
b828d66
Compare
3df4ac1
to
b242a38
Compare
b242a38
to
1804a37
Compare
No description provided.