[libcxx-commits] [libcxx] Result of applying clang-format-18 to each header and source file (PR #79214)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 23 13:52:55 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 6c98c5bd99b4c71a7895337cd4e437e023c2ec7a 3f5c355c9fd732210449618c2ad6f35e2f53cd0a -- libcxx/include/__algorithm/comp_ref_type.h libcxx/include/__algorithm/count_if.h libcxx/include/__algorithm/find_end.h libcxx/include/__algorithm/find_first_of.h libcxx/include/__algorithm/make_projected.h libcxx/include/__algorithm/merge.h libcxx/include/__algorithm/minmax_element.h libcxx/include/__algorithm/pstl_rotate_copy.h libcxx/include/__algorithm/pstl_transform.h libcxx/include/__algorithm/ranges_mismatch.h libcxx/include/__algorithm/replace_copy.h libcxx/include/__algorithm/rotate.h libcxx/include/__algorithm/sample.h libcxx/include/__algorithm/set_union.h libcxx/include/__algorithm/sift_down.h libcxx/include/__algorithm/transform.h libcxx/include/__bit_reference libcxx/include/__chrono/duration.h libcxx/include/__chrono/time_point.h libcxx/include/__config libcxx/include/__format/format_functions.h libcxx/include/__format/formatter_output.h libcxx/include/__functional/bind.h libcxx/include/__functional/bind_back.h libcxx/include/__functional/bind_front.h libcxx/include/__functional/mem_fn.h libcxx/include/__functional/mem_fun_ref.h libcxx/include/__functional/operations.h libcxx/include/__functional/pointer_to_binary_function.h libcxx/include/__functional/pointer_to_unary_function.h libcxx/include/__functional/unary_negate.h libcxx/include/__iterator/access.h libcxx/include/__iterator/bounded_iter.h libcxx/include/__iterator/move_iterator.h libcxx/include/__iterator/reverse_iterator.h libcxx/include/__iterator/wrap_iter.h libcxx/include/__locale libcxx/include/__mdspan/mdspan.h libcxx/include/__memory/allocate_at_least.h libcxx/include/__memory/compressed_pair.h libcxx/include/__memory/pointer_traits.h libcxx/include/__memory/unique_ptr.h libcxx/include/__mutex/lock_guard.h libcxx/include/__random/independent_bits_engine.h libcxx/include/__ranges/access.h libcxx/include/__ranges/all.h libcxx/include/__ranges/common_view.h libcxx/include/__ranges/counted.h libcxx/include/__ranges/data.h libcxx/include/__ranges/drop_view.h libcxx/include/__ranges/lazy_split_view.h libcxx/include/__ranges/rend.h libcxx/include/__ranges/reverse_view.h libcxx/include/__ranges/subrange.h libcxx/include/__split_buffer libcxx/include/__tuple/sfinae_helpers.h libcxx/include/__tuple/tuple_size.h libcxx/include/__type_traits/invoke.h libcxx/include/__type_traits/is_literal_type.h libcxx/include/__type_traits/is_swappable.h libcxx/include/__utility/exception_guard.h libcxx/include/__utility/forward_like.h libcxx/include/__utility/is_pointer_in_range.h libcxx/include/__utility/pair.h libcxx/include/__verbose_abort libcxx/include/any libcxx/include/barrier libcxx/include/cmath libcxx/include/codecvt libcxx/include/future libcxx/include/map libcxx/include/optional libcxx/include/ostream libcxx/include/queue libcxx/include/set libcxx/include/shared_mutex libcxx/include/span libcxx/include/stack libcxx/include/string libcxx/include/tuple libcxx/include/unordered_map libcxx/include/unordered_set libcxx/include/valarray libcxx/include/variant libcxx/include/vector libcxx/src/iostream.cpp libcxx/src/support/ibm/mbsnrtowcs.cpp libcxx/src/support/ibm/wcsnrtombs.cpp libcxx/src/support/win32/thread_win32.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__algorithm/comp_ref_type.h b/libcxx/include/__algorithm/comp_ref_type.h
index c367fbb91a..aa9350c38c 100644
--- a/libcxx/include/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__algorithm/comp_ref_type.h
@@ -41,9 +41,9 @@ 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) {
+ _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) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering");
(void)__l;
(void)__r;
diff --git a/libcxx/include/__algorithm/count_if.h b/libcxx/include/__algorithm/count_if.h
index 99a57efa11..04f52b894f 100644
--- a/libcxx/include/__algorithm/count_if.h
+++ b/libcxx/include/__algorithm/count_if.h
@@ -21,8 +21,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-typename iterator_traits<_InputIterator>::difference_type
-count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
+ typename iterator_traits<_InputIterator>::difference_type
+ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
typename iterator_traits<_InputIterator>::difference_type __r(0);
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/libcxx/include/__algorithm/find_end.h b/libcxx/include/__algorithm/find_end.h
index 0d1fc4094e..4c26891666 100644
--- a/libcxx/include/__algorithm/find_end.h
+++ b/libcxx/include/__algorithm/find_end.h
@@ -205,12 +205,12 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Fo
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
-find_end(_ForwardIterator1 __first1,
- _ForwardIterator1 __last1,
- _ForwardIterator2 __first2,
- _ForwardIterator2 __last2,
- _BinaryPredicate __pred) {
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_end(
+ _ForwardIterator1 __first1,
+ _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2,
+ _ForwardIterator2 __last2,
+ _BinaryPredicate __pred) {
return std::__find_end_classic(__first1, __last1, __first2, __last2, __pred);
}
diff --git a/libcxx/include/__algorithm/find_first_of.h b/libcxx/include/__algorithm/find_first_of.h
index d7ca15514d..14271cccc4 100644
--- a/libcxx/include/__algorithm/find_first_of.h
+++ b/libcxx/include/__algorithm/find_first_of.h
@@ -35,12 +35,12 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_fir
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
-find_first_of(_ForwardIterator1 __first1,
- _ForwardIterator1 __last1,
- _ForwardIterator2 __first2,
- _ForwardIterator2 __last2,
- _BinaryPredicate __pred) {
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
+ _ForwardIterator1 __first1,
+ _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2,
+ _ForwardIterator2 __last2,
+ _BinaryPredicate __pred) {
return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
}
diff --git a/libcxx/include/__algorithm/make_projected.h b/libcxx/include/__algorithm/make_projected.h
index 3eb9300760..bb7bc7e8c0 100644
--- a/libcxx/include/__algorithm/make_projected.h
+++ b/libcxx/include/__algorithm/make_projected.h
@@ -36,8 +36,8 @@ struct _ProjectedPred {
: __pred(__pred_arg), __proj(__proj_arg) {}
template <class _Tp>
- typename __invoke_of<_Pred&, decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>())) >::type
- _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
+ typename __invoke_of<_Pred&, decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>())) >::
+ type _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
operator()(_Tp&& __v) const {
return std::__invoke(__pred, std::__invoke(__proj, std::forward<_Tp>(__v)));
}
@@ -45,8 +45,8 @@ struct _ProjectedPred {
template <class _T1, class _T2>
typename __invoke_of<_Pred&,
decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T1>())),
- decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T2>())) >::type _LIBCPP_CONSTEXPR
- _LIBCPP_HIDE_FROM_ABI
+ decltype(std::__invoke(std::declval<_Proj&>(),
+ std::declval<_T2>())) >::type _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
operator()(_T1&& __lhs, _T2&& __rhs) const {
return std::__invoke(
__pred, std::__invoke(__proj, std::forward<_T1>(__lhs)), std::__invoke(__proj, std::forward<_T2>(__rhs)));
diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h
index 68df5d973e..bad663c4b9 100644
--- a/libcxx/include/__algorithm/merge.h
+++ b/libcxx/include/__algorithm/merge.h
@@ -22,13 +22,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-__merge(_InputIterator1 __first1,
- _InputIterator1 __last1,
- _InputIterator2 __first2,
- _InputIterator2 __last2,
- _OutputIterator __result,
- _Compare __comp) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator __merge(
+ _InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _OutputIterator __result,
+ _Compare __comp) {
for (; __first1 != __last1; ++__result) {
if (__first2 == __last2)
return std::copy(__first1, __last1, __result);
diff --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h
index ebb1630a29..ff8cda321c 100644
--- a/libcxx/include/__algorithm/minmax_element.h
+++ b/libcxx/include/__algorithm/minmax_element.h
@@ -90,9 +90,9 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_ForwardIterator, _ForwardIterator>
-minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ pair<_ForwardIterator, _ForwardIterator>
+ minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
return std::minmax_element(__first, __last, __less<>());
}
diff --git a/libcxx/include/__algorithm/pstl_rotate_copy.h b/libcxx/include/__algorithm/pstl_rotate_copy.h
index 7f20dc8235..33dc9a3635 100644
--- a/libcxx/include/__algorithm/pstl_rotate_copy.h
+++ b/libcxx/include/__algorithm/pstl_rotate_copy.h
@@ -60,12 +60,12 @@ template <class _ExecutionPolicy,
class _ForwardOutIterator,
class _RawPolicy = __remove_cvref_t<_ExecutionPolicy>,
enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
-rotate_copy(_ExecutionPolicy&& __policy,
- _ForwardIterator __first,
- _ForwardIterator __middle,
- _ForwardIterator __last,
- _ForwardOutIterator __result) {
+_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator rotate_copy(
+ _ExecutionPolicy&& __policy,
+ _ForwardIterator __first,
+ _ForwardIterator __middle,
+ _ForwardIterator __last,
+ _ForwardOutIterator __result) {
auto __res =
std::__rotate_copy(__policy, std::move(__first), std::move(__middle), std::move(__last), std::move(__result));
if (!__res)
diff --git a/libcxx/include/__algorithm/pstl_transform.h b/libcxx/include/__algorithm/pstl_transform.h
index c5ea522637..aad59d1f30 100644
--- a/libcxx/include/__algorithm/pstl_transform.h
+++ b/libcxx/include/__algorithm/pstl_transform.h
@@ -49,12 +49,12 @@ template <class _ExecutionPolicy,
class _UnaryOperation,
class _RawPolicy = __remove_cvref_t<_ExecutionPolicy>,
enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
-transform(_ExecutionPolicy&& __policy,
- _ForwardIterator __first,
- _ForwardIterator __last,
- _ForwardOutIterator __result,
- _UnaryOperation __op) {
+_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator transform(
+ _ExecutionPolicy&& __policy,
+ _ForwardIterator __first,
+ _ForwardIterator __last,
+ _ForwardOutIterator __result,
+ _UnaryOperation __op) {
_LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
_LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardOutIterator);
_LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(_ForwardOutIterator, decltype(__op(*__first)));
@@ -90,13 +90,13 @@ template <class _ExecutionPolicy,
class _BinaryOperation,
class _RawPolicy = __remove_cvref_t<_ExecutionPolicy>,
enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
-transform(_ExecutionPolicy&& __policy,
- _ForwardIterator1 __first1,
- _ForwardIterator1 __last1,
- _ForwardIterator2 __first2,
- _ForwardOutIterator __result,
- _BinaryOperation __op) {
+_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator transform(
+ _ExecutionPolicy&& __policy,
+ _ForwardIterator1 __first1,
+ _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2,
+ _ForwardOutIterator __result,
+ _BinaryOperation __op) {
_LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator1);
_LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator2);
_LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardOutIterator);
diff --git a/libcxx/include/__algorithm/ranges_mismatch.h b/libcxx/include/__algorithm/ranges_mismatch.h
index 61da49da98..db9bfc8e87 100644
--- a/libcxx/include/__algorithm/ranges_mismatch.h
+++ b/libcxx/include/__algorithm/ranges_mismatch.h
@@ -68,8 +68,8 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_R1>, iterator_t<_R2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_NODISCARD_EXT
- _LIBCPP_HIDE_FROM_ABI constexpr mismatch_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr mismatch_result<borrowed_iterator_t<_R1>,
+ borrowed_iterator_t<_R2>>
operator()(_R1&& __r1, _R2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return __go(
ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2), __pred, __proj1, __proj2);
diff --git a/libcxx/include/__algorithm/replace_copy.h b/libcxx/include/__algorithm/replace_copy.h
index 518712fad1..9a2258d9f5 100644
--- a/libcxx/include/__algorithm/replace_copy.h
+++ b/libcxx/include/__algorithm/replace_copy.h
@@ -18,12 +18,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-replace_copy(_InputIterator __first,
- _InputIterator __last,
- _OutputIterator __result,
- const _Tp& __old_value,
- const _Tp& __new_value) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator replace_copy(
+ _InputIterator __first,
+ _InputIterator __last,
+ _OutputIterator __result,
+ const _Tp& __old_value,
+ const _Tp& __new_value) {
for (; __first != __last; ++__first, (void)++__result)
if (*__first == __old_value)
*__result = __new_value;
diff --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h
index 9d48f7b6bc..d8162b1a94 100644
--- a/libcxx/include/__algorithm/rotate.h
+++ b/libcxx/include/__algorithm/rotate.h
@@ -133,11 +133,11 @@ __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardItera
}
template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
-__rotate_impl(_BidirectionalIterator __first,
- _BidirectionalIterator __middle,
- _BidirectionalIterator __last,
- bidirectional_iterator_tag) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator __rotate_impl(
+ _BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ bidirectional_iterator_tag) {
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
if (is_trivially_move_assignable<value_type>::value) {
if (_IterOps<_AlgPolicy>::next(__first) == __middle)
@@ -149,11 +149,11 @@ __rotate_impl(_BidirectionalIterator __first,
}
template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
-__rotate_impl(_RandomAccessIterator __first,
- _RandomAccessIterator __middle,
- _RandomAccessIterator __last,
- random_access_iterator_tag) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator __rotate_impl(
+ _RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
+ random_access_iterator_tag) {
typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
if (is_trivially_move_assignable<value_type>::value) {
if (_IterOps<_AlgPolicy>::next(__first) == __middle)
diff --git a/libcxx/include/__algorithm/sample.h b/libcxx/include/__algorithm/sample.h
index 32030839d0..ebe5180b7e 100644
--- a/libcxx/include/__algorithm/sample.h
+++ b/libcxx/include/__algorithm/sample.h
@@ -34,13 +34,13 @@ template <class _AlgPolicy,
class _SampleIterator,
class _Distance,
class _UniformRandomNumberGenerator>
-_LIBCPP_HIDE_FROM_ABI _SampleIterator
-__sample(_PopulationIterator __first,
- _PopulationSentinel __last,
- _SampleIterator __output_iter,
- _Distance __n,
- _UniformRandomNumberGenerator& __g,
- input_iterator_tag) {
+_LIBCPP_HIDE_FROM_ABI _SampleIterator __sample(
+ _PopulationIterator __first,
+ _PopulationSentinel __last,
+ _SampleIterator __output_iter,
+ _Distance __n,
+ _UniformRandomNumberGenerator& __g,
+ input_iterator_tag) {
_Distance __k = 0;
for (; __first != __last && __k < __n; ++__first, (void)++__k)
__output_iter[__k] = *__first;
@@ -59,13 +59,13 @@ template <class _AlgPolicy,
class _SampleIterator,
class _Distance,
class _UniformRandomNumberGenerator>
-_LIBCPP_HIDE_FROM_ABI _SampleIterator
-__sample(_PopulationIterator __first,
- _PopulationSentinel __last,
- _SampleIterator __output_iter,
- _Distance __n,
- _UniformRandomNumberGenerator& __g,
- forward_iterator_tag) {
+_LIBCPP_HIDE_FROM_ABI _SampleIterator __sample(
+ _PopulationIterator __first,
+ _PopulationSentinel __last,
+ _SampleIterator __output_iter,
+ _Distance __n,
+ _UniformRandomNumberGenerator& __g,
+ forward_iterator_tag) {
_Distance __unsampled_sz = _IterOps<_AlgPolicy>::distance(__first, __last);
for (__n = std::min(__n, __unsampled_sz); __n != 0; ++__first) {
_Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
@@ -83,12 +83,12 @@ template <class _AlgPolicy,
class _SampleIterator,
class _Distance,
class _UniformRandomNumberGenerator>
-_LIBCPP_HIDE_FROM_ABI _SampleIterator
-__sample(_PopulationIterator __first,
- _PopulationSentinel __last,
- _SampleIterator __output_iter,
- _Distance __n,
- _UniformRandomNumberGenerator& __g) {
+_LIBCPP_HIDE_FROM_ABI _SampleIterator __sample(
+ _PopulationIterator __first,
+ _PopulationSentinel __last,
+ _SampleIterator __output_iter,
+ _Distance __n,
+ _UniformRandomNumberGenerator& __g) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n >= 0, "N must be a positive number.");
using _PopIterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_PopulationIterator>;
diff --git a/libcxx/include/__algorithm/set_union.h b/libcxx/include/__algorithm/set_union.h
index 0eebd8d778..cf48adae03 100644
--- a/libcxx/include/__algorithm/set_union.h
+++ b/libcxx/include/__algorithm/set_union.h
@@ -62,13 +62,13 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-set_union(_InputIterator1 __first1,
- _InputIterator1 __last1,
- _InputIterator2 __first2,
- _InputIterator2 __last2,
- _OutputIterator __result,
- _Compare __comp) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
+ _InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _OutputIterator __result,
+ _Compare __comp) {
return std::__set_union<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
std::move(__first1),
std::move(__last1),
@@ -80,12 +80,12 @@ set_union(_InputIterator1 __first1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-set_union(_InputIterator1 __first1,
- _InputIterator1 __last1,
- _InputIterator2 __first2,
- _InputIterator2 __last2,
- _OutputIterator __result) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
+ _InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _OutputIterator __result) {
return std::set_union(
std::move(__first1),
std::move(__last1),
diff --git a/libcxx/include/__algorithm/sift_down.h b/libcxx/include/__algorithm/sift_down.h
index f4910133e8..42803e3063 100644
--- a/libcxx/include/__algorithm/sift_down.h
+++ b/libcxx/include/__algorithm/sift_down.h
@@ -80,10 +80,10 @@ __sift_down(_RandomAccessIterator __first,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
-__floyd_sift_down(_RandomAccessIterator __first,
- _Compare&& __comp,
- typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator __floyd_sift_down(
+ _RandomAccessIterator __first,
+ _Compare&& __comp,
+ typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
_LIBCPP_ASSERT_INTERNAL(__len >= 2, "shouldn't be called unless __len >= 2");
diff --git a/libcxx/include/__algorithm/transform.h b/libcxx/include/__algorithm/transform.h
index 92f759df0d..1b42440959 100644
--- a/libcxx/include/__algorithm/transform.h
+++ b/libcxx/include/__algorithm/transform.h
@@ -26,12 +26,12 @@ transform(_InputIterator __first, _InputIterator __last, _OutputIterator __resul
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
-transform(_InputIterator1 __first1,
- _InputIterator1 __last1,
- _InputIterator2 __first2,
- _OutputIterator __result,
- _BinaryOperation __binary_op) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator transform(
+ _InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _OutputIterator __result,
+ _BinaryOperation __binary_op) {
for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);
return __result;
diff --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h
index 88d246c2fd..5693ee6440 100644
--- a/libcxx/include/__chrono/duration.h
+++ b/libcxx/include/__chrono/duration.h
@@ -391,8 +391,8 @@ operator<=>(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Perio
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
-operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
+ typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+ operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
return _Cd(_Cd(__lhs).count() + _Cd(__rhs).count());
}
@@ -401,8 +401,8 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
-operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
+ typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+ operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
return _Cd(_Cd(__lhs).count() - _Cd(__rhs).count());
}
@@ -468,8 +468,8 @@ operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) {
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
-operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
+ typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
+ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
return _Cd(static_cast<_Cr>(_Cd(__lhs).count()) % static_cast<_Cr>(_Cd(__rhs).count()));
diff --git a/libcxx/include/__chrono/time_point.h b/libcxx/include/__chrono/time_point.h
index cb5bf4d13f..e65253ddb9 100644
--- a/libcxx/include/__chrono/time_point.h
+++ b/libcxx/include/__chrono/time_point.h
@@ -78,7 +78,7 @@ public:
template <class _Clock, class _Duration1, class _Duration2>
struct _LIBCPP_TEMPLATE_VIS
-common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _Duration2> > {
+ common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _Duration2> > {
typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
};
@@ -180,9 +180,9 @@ operator<=>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock
// time_point operator+(time_point x, duration y);
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
-operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
+ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Tr;
return _Tr(__lhs.time_since_epoch() + __rhs);
}
@@ -190,18 +190,18 @@ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
// time_point operator+(duration x, time_point y);
template <class _Rep1, class _Period1, class _Clock, class _Duration2>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
-operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
+ operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
return __rhs + __lhs;
}
// time_point operator-(time_point x, duration y);
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
-operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
+ operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) {
typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Ret;
return _Ret(__lhs.time_since_epoch() - __rhs);
}
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 1163b0fb51..015bff70f5 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -402,10 +402,9 @@ using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
template <class _OutIt, class _CharT, class _FormatOutIt>
requires(output_iterator<_OutIt, const _CharT&>)
-_LIBCPP_HIDE_FROM_ABI _OutIt
-__vformat_to(_OutIt __out_it,
- basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+_LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(_OutIt __out_it,
+ basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
if constexpr (same_as<_OutIt, _FormatOutIt>)
return std::__format::__vformat_to(
basic_format_parse_context{__fmt, __args.__size()}, std::__format_context_create(std::move(__out_it), __args));
@@ -535,11 +534,11 @@ formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
template <class _OutIt, class _CharT, class _FormatOutIt>
requires(output_iterator<_OutIt, const _CharT&>)
-_LIBCPP_HIDE_FROM_ABI _OutIt
-__vformat_to(_OutIt __out_it,
- locale __loc,
- basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+_LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(
+ _OutIt __out_it,
+ locale __loc,
+ basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
if constexpr (same_as<_OutIt, _FormatOutIt>)
return std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
std::__format_context_create(std::move(__out_it), __args, std::move(__loc)));
diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index 0ec357c4c6..eebe880d69 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -97,8 +97,8 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+_LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
__out_it.__get_container()->__copy(__str);
return __out_it;
@@ -113,16 +113,16 @@ __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto _
template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(_Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+_LIBCPP_HIDE_FROM_ABI auto __copy(_Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
return __formatter::__copy(basic_string_view{__first, __last}, std::move(__out_it));
}
template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(_Iterator __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+_LIBCPP_HIDE_FROM_ABI auto __copy(_Iterator __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
return __formatter::__copy(basic_string_view{std::to_address(__first), __n}, std::move(__out_it));
}
@@ -133,11 +133,9 @@ template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT,
class _UnaryOperation>
-_LIBCPP_HIDE_FROM_ABI auto
-__transform(_Iterator __first,
- _Iterator __last,
- output_iterator<const _OutCharT&> auto __out_it,
- _UnaryOperation __operation) -> decltype(__out_it) {
+_LIBCPP_HIDE_FROM_ABI auto __transform(
+ _Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it, _UnaryOperation __operation)
+ -> decltype(__out_it) {
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
__out_it.__get_container()->__transform(__first, __last, std::move(__operation));
return __out_it;
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index 091381e095..19e7d82155 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -104,8 +104,8 @@ struct __mu_return2<true, _Ti, _Uj> {
template <class _Ti, class _Uj, __enable_if_t<0 < is_placeholder<_Ti>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
-__mu(_Ti&, _Uj& __uj) {
+ typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
+ __mu(_Ti&, _Uj& __uj) {
const size_t __indx = is_placeholder<_Ti>::value - 1;
return std::forward<typename tuple_element<__indx, _Uj>::type>(std::get<__indx>(__uj));
}
@@ -224,8 +224,8 @@ public:
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
- operator()(_Args&&... __args) const {
+ typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
+ operator()(_Args&&... __args) const {
return std::__apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(std::forward<_Args>(__args)...));
}
};
diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h
index abe57a40fd..ce26d3b706 100644
--- a/libcxx/include/__functional/bind_back.h
+++ b/libcxx/include/__functional/bind_back.h
@@ -52,7 +52,7 @@ struct __bind_back_t : __perfect_forward<__bind_back_op<tuple_size_v<_BoundArgs>
template <class _Fn, class... _Args>
requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
- (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
+ (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
_LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) noexcept(
noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h
index 0a5ea2bdb6..30dda53361 100644
--- a/libcxx/include/__functional/bind_front.h
+++ b/libcxx/include/__functional/bind_front.h
@@ -30,8 +30,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __bind_front_op {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const noexcept(
- noexcept(std::invoke(std::forward<_Args>(__args)...))) -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
+ _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const
+ noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...)))
+ -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
return std::invoke(std::forward<_Args>(__args)...);
}
};
diff --git a/libcxx/include/__functional/mem_fn.h b/libcxx/include/__functional/mem_fn.h
index ee07a71774..349a6ce3a7 100644
--- a/libcxx/include/__functional/mem_fn.h
+++ b/libcxx/include/__functional/mem_fn.h
@@ -38,8 +38,8 @@ public:
template <class... _ArgTypes>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- typename __invoke_return<type, _ArgTypes...>::type
- operator()(_ArgTypes&&... __args) const {
+ typename __invoke_return<type, _ArgTypes...>::type
+ operator()(_ArgTypes&&... __args) const {
return std::__invoke(__f_, std::forward<_ArgTypes>(__args)...);
}
};
diff --git a/libcxx/include/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h
index c344420b02..fe43c46560 100644
--- a/libcxx/include/__functional/mem_fun_ref.h
+++ b/libcxx/include/__functional/mem_fun_ref.h
@@ -89,8 +89,8 @@ public:
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<const _Tp*, _Ap, _Sp> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t
+ : public __binary_function<const _Tp*, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap) const;
public:
diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h
index bd00a3bf8e..7ddc00650f 100644
--- a/libcxx/include/__functional/operations.h
+++ b/libcxx/include/__functional/operations.h
@@ -51,8 +51,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS plus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) +
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) + std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -77,8 +77,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS minus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) -
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) - std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -103,8 +103,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS multiplies<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) *
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) * std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -129,8 +129,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS divides<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) /
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) / std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -155,8 +155,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS modulus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) %
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) % std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -206,8 +206,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS bit_and<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) &
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) & std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -250,8 +250,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS bit_or<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) |
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) | std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -276,8 +276,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS bit_xor<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) ^
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) ^ std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -304,8 +304,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS equal_to<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) ==
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) == std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -339,8 +339,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) !=
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) != std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -365,8 +365,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS less<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) <
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) < std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -391,8 +391,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS less_equal<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) <=
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) <= std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -417,8 +417,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS greater_equal<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) >=
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) >= std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -443,8 +443,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS greater<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) >
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) > std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -471,8 +471,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS logical_and<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) &&
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) && std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -520,8 +520,8 @@ template <>
struct _LIBCPP_TEMPLATE_VIS logical_or<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) ||
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
+ noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) || std::forward<_T2>(__u);
}
typedef void is_transparent;
diff --git a/libcxx/include/__functional/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h
index e345250dcd..51a7c3fe0f 100644
--- a/libcxx/include/__functional/pointer_to_binary_function.h
+++ b/libcxx/include/__functional/pointer_to_binary_function.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function
+ : public __binary_function<_Arg1, _Arg2, _Result> {
_Result (*__f_)(_Arg1, _Arg2);
public:
diff --git a/libcxx/include/__functional/pointer_to_unary_function.h b/libcxx/include/__functional/pointer_to_unary_function.h
index 3a5d153d36..0338e76717 100644
--- a/libcxx/include/__functional/pointer_to_unary_function.h
+++ b/libcxx/include/__functional/pointer_to_unary_function.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Arg, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<_Arg, _Result> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function
+ : public __unary_function<_Arg, _Result> {
_Result (*__f_)(_Arg);
public:
diff --git a/libcxx/include/__functional/unary_negate.h b/libcxx/include/__functional/unary_negate.h
index 5bd487a97b..d130b7d728 100644
--- a/libcxx/include/__functional/unary_negate.h
+++ b/libcxx/include/__functional/unary_negate.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function<typename _Predicate::argument_type, bool> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate
+ : public __unary_function<typename _Predicate::argument_type, bool> {
_Predicate __pred_;
public:
diff --git a/libcxx/include/__iterator/access.h b/libcxx/include/__iterator/access.h
index acc4f60bf6..5c6090eeb4 100644
--- a/libcxx/include/__iterator/access.h
+++ b/libcxx/include/__iterator/access.h
@@ -54,8 +54,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(const _Cp& __c) ->
# if _LIBCPP_STD_VER >= 14
template <class _Cp>
-_LIBCPP_HIDE_FROM_ABI constexpr auto
-cbegin(const _Cp& __c) noexcept(noexcept(std::begin(__c))) -> decltype(std::begin(__c)) {
+_LIBCPP_HIDE_FROM_ABI constexpr auto cbegin(const _Cp& __c) noexcept(noexcept(std::begin(__c)))
+ -> decltype(std::begin(__c)) {
return std::begin(__c);
}
diff --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h
index 1b6f9e17ad..2a66764887 100644
--- a/libcxx/include/__iterator/bounded_iter.h
+++ b/libcxx/include/__iterator/bounded_iter.h
@@ -78,8 +78,8 @@ private:
//
// Since it is non-standard for iterators to have this constructor, __bounded_iter must
// be created via `std::__make_bounded_iter`.
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(
+ _Iterator __current, _Iterator __begin, _Iterator __end)
: __current_(__current), __begin_(__begin), __end_(__end) {
_LIBCPP_ASSERT_INTERNAL(__begin <= __end, "__bounded_iter(current, begin, end): [begin, end) is not a valid range");
}
diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h
index f847a7b9b7..d1bd0138bd 100644
--- a/libcxx/include/__iterator/move_iterator.h
+++ b/libcxx/include/__iterator/move_iterator.h
@@ -292,8 +292,8 @@ operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
#if _LIBCPP_STD_VER >= 20
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
inline _LIBCPP_HIDE_FROM_ABI constexpr auto
-operator<=>(const move_iterator<_Iter1>& __x,
- const move_iterator<_Iter2>& __y) -> compare_three_way_result_t<_Iter1, _Iter2> {
+operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
+ -> compare_three_way_result_t<_Iter1, _Iter2> {
return __x.base() <=> __y.base();
}
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h
index 04b248504d..79b48bcea5 100644
--- a/libcxx/include/__iterator/reverse_iterator.h
+++ b/libcxx/include/__iterator/reverse_iterator.h
@@ -184,7 +184,7 @@ public:
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i) noexcept(
- is_nothrow_copy_constructible_v<_Iter> && noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
+ is_nothrow_copy_constructible_v<_Iter>&& noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
auto __tmp = __i.base();
return ranges::iter_move(--__tmp);
}
@@ -192,8 +192,9 @@ public:
template <indirectly_swappable<_Iter> _Iter2>
_LIBCPP_HIDE_FROM_ABI friend constexpr void
iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y) noexcept(
- is_nothrow_copy_constructible_v<_Iter> && is_nothrow_copy_constructible_v<_Iter2> &&
- noexcept(ranges::iter_swap(--std::declval<_Iter&>(), --std::declval<_Iter2&>()))) {
+ is_nothrow_copy_constructible_v<_Iter> &&
+ is_nothrow_copy_constructible_v<_Iter2>&& noexcept(
+ ranges::iter_swap(--std::declval<_Iter&>(), --std::declval<_Iter2&>()))) {
auto __xtmp = __x.base();
auto __ytmp = __y.base();
ranges::iter_swap(--__xtmp, --__ytmp);
@@ -284,8 +285,8 @@ operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto
-operator-(const reverse_iterator<_Iter1>& __x,
- const reverse_iterator<_Iter2>& __y) -> decltype(__y.base() - __x.base()) {
+operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
+ -> decltype(__y.base() - __x.base()) {
return __y.base() - __x.base();
}
#else
@@ -379,7 +380,7 @@ public:
_LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter>
iter_move(const __unconstrained_reverse_iterator& __i) noexcept(
- is_nothrow_copy_constructible_v<_Iter> && noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
+ is_nothrow_copy_constructible_v<_Iter>&& noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
auto __tmp = __i.base();
return ranges::iter_move(--__tmp);
}
diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index c0280db8a6..3827241e5f 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -182,8 +182,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
operator-(const __wrap_iter<_Iter1>& __x,
const __wrap_iter<_Iter2>& __y) _NOEXCEPT->decltype(__x.base() - __y.base())
#else
-typename __wrap_iter<_Iter1>::difference_type
-operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
+ typename __wrap_iter<_Iter1>::difference_type
+ operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
#endif // C++03
{
return __x.base() - __y.base();
diff --git a/libcxx/include/__mdspan/mdspan.h b/libcxx/include/__mdspan/mdspan.h
index 4dba43be6d..684828eb90 100644
--- a/libcxx/include/__mdspan/mdspan.h
+++ b/libcxx/include/__mdspan/mdspan.h
@@ -269,8 +269,8 @@ private:
template <class _ElementType, class... _OtherIndexTypes>
requires((is_convertible_v<_OtherIndexTypes, size_t> && ...) && (sizeof...(_OtherIndexTypes) > 0))
-explicit mdspan(_ElementType*,
- _OtherIndexTypes...) -> mdspan<_ElementType, dextents<size_t, sizeof...(_OtherIndexTypes)>>;
+explicit mdspan(_ElementType*, _OtherIndexTypes...)
+ -> mdspan<_ElementType, dextents<size_t, sizeof...(_OtherIndexTypes)>>;
template <class _Pointer>
requires(is_pointer_v<remove_reference_t<_Pointer>>)
diff --git a/libcxx/include/__memory/allocate_at_least.h b/libcxx/include/__memory/allocate_at_least.h
index 0aae547732..05cbdee828 100644
--- a/libcxx/include/__memory/allocate_at_least.h
+++ b/libcxx/include/__memory/allocate_at_least.h
@@ -49,9 +49,9 @@ struct __allocation_result {
};
template <class _Alloc>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR __allocation_result<typename allocator_traits<_Alloc>::pointer>
-__allocate_at_least(_Alloc& __alloc, size_t __n) {
+_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ __allocation_result<typename allocator_traits<_Alloc>::pointer>
+ __allocate_at_least(_Alloc& __alloc, size_t __n) {
return {__alloc.allocate(__n), __n};
}
diff --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h
index 9428df9387..e9faada2f0 100644
--- a/libcxx/include/__memory/compressed_pair.h
+++ b/libcxx/include/__memory/compressed_pair.h
@@ -110,7 +110,7 @@ public:
template <bool _Dummy = true,
class = __enable_if_t< __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
- __dependent_type<is_default_constructible<_T2>, _Dummy>::value > >
+ __dependent_type<is_default_constructible<_T2>, _Dummy>::value > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair()
: _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index 02a96da186..643b7391d3 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -202,16 +202,16 @@ struct _IsFancyPointer {
// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
template <class _Pointer, class = __enable_if_t< _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value > >
-_LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR __decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
-__to_address(const _Pointer& __p) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ __decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
+ __to_address(const _Pointer& __p) _NOEXCEPT {
return __to_address_helper<_Pointer>::__call(__p);
}
template <class _Pointer, class>
struct __to_address_helper {
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR static decltype(std::__to_address(std::declval<const _Pointer&>().operator->()))
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(std::__to_address(
+ std::declval<const _Pointer&>().operator->()))
__call(const _Pointer& __p) _NOEXCEPT {
return std::__to_address(__p.operator->());
}
@@ -220,8 +220,8 @@ struct __to_address_helper {
template <class _Pointer>
struct __to_address_helper<_Pointer,
decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))> {
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR static decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(pointer_traits<_Pointer>::to_address(
+ std::declval<const _Pointer&>()))
__call(const _Pointer& __p) _NOEXCEPT {
return pointer_traits<_Pointer>::to_address(__p);
}
@@ -234,8 +234,8 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(_Tp* __p) noexcept {
}
template <class _Pointer>
-inline _LIBCPP_HIDE_FROM_ABI constexpr auto
-to_address(const _Pointer& __p) noexcept -> decltype(std::__to_address(__p)) {
+inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(const _Pointer& __p) noexcept
+ -> decltype(std::__to_address(__p)) {
return std::__to_address(__p);
}
#endif
diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h
index daeed0514f..db473eaa50 100644
--- a/libcxx/include/__memory/unique_ptr.h
+++ b/libcxx/include/__memory/unique_ptr.h
@@ -171,8 +171,8 @@ public:
: __ptr_(__value_init_tag(), __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(pointer __p) _NOEXCEPT
+ : __ptr_(__p, __value_init_tag()) {}
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
@@ -336,8 +336,8 @@ public:
bool _Dummy = true,
class = _EnableIfDeleterDefaultConstructible<_Dummy>,
class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(_Pp __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(_Pp __p) _NOEXCEPT
+ : __ptr_(__p, __value_init_tag()) {}
template <class _Pp,
bool _Dummy = true,
@@ -494,8 +494,8 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const unique_ptr<_T1, _D1>& __x, co
template <class _T1, class _D1, class _T2, class _D2>
requires three_way_comparable_with<typename unique_ptr<_T1, _D1>::pointer, typename unique_ptr<_T2, _D2>::pointer>
_LIBCPP_HIDE_FROM_ABI
-compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer, typename unique_ptr<_T2, _D2>::pointer>
-operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
+ compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer, typename unique_ptr<_T2, _D2>::pointer>
+ operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
return compare_three_way()(__x.get(), __y.get());
}
#endif
diff --git a/libcxx/include/__mutex/lock_guard.h b/libcxx/include/__mutex/lock_guard.h
index 059f19eef3..c075512fb9 100644
--- a/libcxx/include/__mutex/lock_guard.h
+++ b/libcxx/include/__mutex/lock_guard.h
@@ -29,8 +29,8 @@ private:
mutex_type& __m_;
public:
- _LIBCPP_NODISCARD_EXT
- _LIBCPP_HIDE_FROM_ABI explicit lock_guard(mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI explicit lock_guard(mutex_type& __m)
+ _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
: __m_(__m) {
__m_.lock();
}
diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h
index 693e37f2e9..0f4a7b82b9 100644
--- a/libcxx/include/__random/independent_bits_engine.h
+++ b/libcxx/include/__random/independent_bits_engine.h
@@ -70,10 +70,10 @@ private:
static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
static _LIBCPP_CONSTEXPR const _Working_result_type __y0 = __w0 >= _WDt ? 0 : (_Rp >> __w0) << __w0;
static _LIBCPP_CONSTEXPR const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 : (_Rp >> (__w0 + 1)) << (__w0 + 1);
- static _LIBCPP_CONSTEXPR const _Engine_result_type
- __mask0 = __w0 > 0 ? _Engine_result_type(~0) >> (_EDt - __w0) : _Engine_result_type(0);
- static _LIBCPP_CONSTEXPR const _Engine_result_type
- __mask1 = __w0 < _EDt - 1 ? _Engine_result_type(~0) >> (_EDt - (__w0 + 1)) : _Engine_result_type(~0);
+ static _LIBCPP_CONSTEXPR const
+ _Engine_result_type __mask0 = __w0 > 0 ? _Engine_result_type(~0) >> (_EDt - __w0) : _Engine_result_type(0);
+ static _LIBCPP_CONSTEXPR const _Engine_result_type __mask1 =
+ __w0 < _EDt - 1 ? _Engine_result_type(~0) >> (_EDt - (__w0 + 1)) : _Engine_result_type(~0);
public:
static _LIBCPP_CONSTEXPR const result_type _Min = 0;
diff --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h
index 2f6efbd770..263fdd637f 100644
--- a/libcxx/include/__ranges/access.h
+++ b/libcxx/include/__ranges/access.h
@@ -193,8 +193,9 @@ struct __fn {
template <class _Tp>
requires is_rvalue_reference_v<_Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
- noexcept(ranges::end(static_cast<const _Tp&&>(__t)))) -> decltype(ranges::end(static_cast<const _Tp&&>(__t))) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+ noexcept(noexcept(ranges::end(static_cast<const _Tp&&>(__t))))
+ -> decltype(ranges::end(static_cast<const _Tp&&>(__t))) {
return ranges::end(static_cast<const _Tp&&>(__t));
}
};
diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h
index 023cee6caa..b735bdc716 100644
--- a/libcxx/include/__ranges/all.h
+++ b/libcxx/include/__ranges/all.h
@@ -39,8 +39,9 @@ namespace __all {
struct __fn : __range_adaptor_closure<__fn> {
template <class _Tp>
requires ranges::view<decay_t<_Tp>>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
- noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))) -> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+ noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))))
+ -> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))) {
return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t));
}
diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h
index 133236dd1d..4b5b04c989 100644
--- a/libcxx/include/__ranges/common_view.h
+++ b/libcxx/include/__ranges/common_view.h
@@ -114,14 +114,16 @@ namespace __common {
struct __fn : __range_adaptor_closure<__fn> {
template <class _Range>
requires common_range<_Range>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const noexcept(
- noexcept(views::all(std::forward<_Range>(__range)))) -> decltype(views::all(std::forward<_Range>(__range))) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
+ noexcept(noexcept(views::all(std::forward<_Range>(__range))))
+ -> decltype(views::all(std::forward<_Range>(__range))) {
return views::all(std::forward<_Range>(__range));
}
template <class _Range>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const noexcept(noexcept(common_view{
- std::forward<_Range>(__range)})) -> decltype(common_view{std::forward<_Range>(__range)}) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
+ noexcept(noexcept(common_view{std::forward<_Range>(__range)}))
+ -> decltype(common_view{std::forward<_Range>(__range)}) {
return common_view{std::forward<_Range>(__range)};
}
};
diff --git a/libcxx/include/__ranges/counted.h b/libcxx/include/__ranges/counted.h
index 6a9ee91dee..3376348957 100644
--- a/libcxx/include/__ranges/counted.h
+++ b/libcxx/include/__ranges/counted.h
@@ -48,8 +48,9 @@ struct __fn {
}
template <random_access_iterator _It>
- _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_It __it, iter_difference_t<_It> __count) noexcept(
- noexcept(subrange(__it, __it + __count))) -> decltype(subrange(__it, __it + __count)) {
+ _LIBCPP_HIDE_FROM_ABI static constexpr auto
+ __go(_It __it, iter_difference_t<_It> __count) noexcept(noexcept(subrange(__it, __it + __count)))
+ -> decltype(subrange(__it, __it + __count)) {
return subrange(__it, __it + __count);
}
diff --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h
index 5f86b73919..18002bb52c 100644
--- a/libcxx/include/__ranges/data.h
+++ b/libcxx/include/__ranges/data.h
@@ -83,8 +83,9 @@ struct __fn {
template <class _Tp>
requires is_rvalue_reference_v<_Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
- noexcept(ranges::data(static_cast<const _Tp&&>(__t)))) -> decltype(ranges::data(static_cast<const _Tp&&>(__t))) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+ noexcept(noexcept(ranges::data(static_cast<const _Tp&&>(__t))))
+ -> decltype(ranges::data(static_cast<const _Tp&&>(__t))) {
return ranges::data(static_cast<const _Tp&&>(__t));
}
};
diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h
index 7f095bf2b4..83bb598b0a 100644
--- a/libcxx/include/__ranges/drop_view.h
+++ b/libcxx/include/__ranges/drop_view.h
@@ -289,14 +289,14 @@ struct __fn {
template <class _Range, convertible_to<range_difference_t<_Range>> _Np, class _RawRange = remove_cvref_t<_Range>>
// Note: without specifically excluding the other cases, GCC sees this overload as ambiguous with the other
// overloads.
- requires(!(__is_empty_view<_RawRange> ||
+ requires(
+ !(__is_empty_view<_RawRange> ||
# if _LIBCPP_STD_VER >= 23
- __is_repeat_specialization<_RawRange> ||
+ __is_repeat_specialization<_RawRange> ||
# endif
- (__is_subrange_specialization_with_store_size<_RawRange> && sized_range<_RawRange> &&
- random_access_range<_RawRange>) ||
- (__is_passthrough_specialization<_RawRange> && sized_range<_RawRange> &&
- random_access_range<_RawRange>)))
+ (__is_subrange_specialization_with_store_size<_RawRange> && sized_range<_RawRange> &&
+ random_access_range<_RawRange>) ||
+ (__is_passthrough_specialization<_RawRange> && sized_range<_RawRange> && random_access_range<_RawRange>)))
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Np&& __n) const
noexcept(noexcept(drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
-> decltype(drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n))) {
diff --git a/libcxx/include/__ranges/lazy_split_view.h b/libcxx/include/__ranges/lazy_split_view.h
index 31240cc610..e96398b14b 100644
--- a/libcxx/include/__ranges/lazy_split_view.h
+++ b/libcxx/include/__ranges/lazy_split_view.h
@@ -400,8 +400,8 @@ template <class _Range, class _Pattern>
lazy_split_view(_Range&&, _Pattern&&) -> lazy_split_view<views::all_t<_Range>, views::all_t<_Pattern>>;
template <input_range _Range>
-lazy_split_view(_Range&&,
- range_value_t<_Range>) -> lazy_split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;
+lazy_split_view(_Range&&, range_value_t<_Range>)
+ -> lazy_split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;
namespace views {
namespace __lazy_split_view {
diff --git a/libcxx/include/__ranges/rend.h b/libcxx/include/__ranges/rend.h
index 14d5a1bbea..58d98aafd2 100644
--- a/libcxx/include/__ranges/rend.h
+++ b/libcxx/include/__ranges/rend.h
@@ -105,8 +105,9 @@ struct __fn {
template <class _Tp>
requires is_rvalue_reference_v<_Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
- noexcept(ranges::rend(static_cast<const _Tp&&>(__t)))) -> decltype(ranges::rend(static_cast<const _Tp&&>(__t))) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+ noexcept(noexcept(ranges::rend(static_cast<const _Tp&&>(__t))))
+ -> decltype(ranges::rend(static_cast<const _Tp&&>(__t))) {
return ranges::rend(static_cast<const _Tp&&>(__t));
}
};
diff --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h
index d75e1061b9..f784625981 100644
--- a/libcxx/include/__ranges/reverse_view.h
+++ b/libcxx/include/__ranges/reverse_view.h
@@ -178,8 +178,9 @@ struct __fn : __range_adaptor_closure<__fn> {
template <class _Range>
requires(!__is_reverse_view<remove_cvref_t<_Range>> && !__is_sized_reverse_subrange<remove_cvref_t<_Range>> &&
!__is_unsized_reverse_subrange<remove_cvref_t<_Range>>)
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const noexcept(noexcept(reverse_view{
- std::forward<_Range>(__range)})) -> decltype(reverse_view{std::forward<_Range>(__range)}) {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
+ noexcept(noexcept(reverse_view{std::forward<_Range>(__range)}))
+ -> decltype(reverse_view{std::forward<_Range>(__range)}) {
return reverse_view{std::forward<_Range>(__range)};
}
};
diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index 6fe533e945..a41978275b 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -202,11 +202,12 @@ template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
subrange(_Iter, _Sent, make_unsigned_t<iter_difference_t<_Iter>>) -> subrange<_Iter, _Sent, subrange_kind::sized>;
template <borrowed_range _Range>
-subrange(_Range&&) -> subrange<iterator_t<_Range>,
- sentinel_t<_Range>,
- (sized_range<_Range> || sized_sentinel_for<sentinel_t<_Range>, iterator_t<_Range>>)
- ? subrange_kind::sized
- : subrange_kind::unsized>;
+subrange(_Range&&)
+ -> subrange<iterator_t<_Range>,
+ sentinel_t<_Range>,
+ (sized_range<_Range> || sized_sentinel_for<sentinel_t<_Range>, iterator_t<_Range>>)
+ ? subrange_kind::sized
+ : subrange_kind::unsized>;
template <borrowed_range _Range>
subrange(_Range&&, make_unsigned_t<range_difference_t<_Range>>)
diff --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h
index 9b1c1ecdca..b57f2a4c2e 100644
--- a/libcxx/include/__tuple/sfinae_helpers.h
+++ b/libcxx/include/__tuple/sfinae_helpers.h
@@ -42,8 +42,8 @@ struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...
struct __tuple_sfinae_base {
template <template <class, class...> class _Trait, class... _LArgs, class... _RArgs>
- static auto __do_test(__tuple_types<_LArgs...>,
- __tuple_types<_RArgs...>) -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
+ static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
+ -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
template <template <class...> class>
static auto __do_test(...) -> false_type;
diff --git a/libcxx/include/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h
index a3fd45fc57..b8320106fb 100644
--- a/libcxx/include/__tuple/tuple_size.h
+++ b/libcxx/include/__tuple/tuple_size.h
@@ -43,7 +43,7 @@ struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS
-tuple_size<__enable_if_tuple_size_imp< const volatile _Tp, integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ tuple_size<__enable_if_tuple_size_imp< const volatile _Tp, integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
#else
diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h
index ddeb45c3d8..c0487e25a0 100644
--- a/libcxx/include/__type_traits/invoke.h
+++ b/libcxx/include/__type_traits/invoke.h
@@ -357,8 +357,8 @@ struct __invokable_r {
using _Result = decltype(__try_call<_Fp, _Args...>(0));
using type = __conditional_t<_IsNotSame<_Result, __nat>::value,
- __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
- false_type>;
+ __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
+ false_type>;
static const bool value = type::value;
};
template <class _Fp, class... _Args>
diff --git a/libcxx/include/__type_traits/is_literal_type.h b/libcxx/include/__type_traits/is_literal_type.h
index 10e23bceff..81da34572c 100644
--- a/libcxx/include/__type_traits/is_literal_type.h
+++ b/libcxx/include/__type_traits/is_literal_type.h
@@ -20,8 +20,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> {};
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type
+ : public integral_constant<bool, __is_literal_type(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h
index e4c0909f57..06e092692d 100644
--- a/libcxx/include/__type_traits/is_swappable.h
+++ b/libcxx/include/__type_traits/is_swappable.h
@@ -75,8 +75,8 @@ template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _U
struct __nothrow_swappable_with {
static const bool value =
#ifndef _LIBCPP_HAS_NO_NOEXCEPT
- noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) &&
- noexcept(swap(std::declval<_Up>(), std::declval<_Tp>()));
+ noexcept(swap(std::declval<_Tp>(), std::declval<_Up>()))&& noexcept(
+ swap(std::declval<_Up>(), std::declval<_Tp>()));
#else
false;
#endif
diff --git a/libcxx/include/__utility/exception_guard.h b/libcxx/include/__utility/exception_guard.h
index 5ddd202400..8d90dfd5f1 100644
--- a/libcxx/include/__utility/exception_guard.h
+++ b/libcxx/include/__utility/exception_guard.h
@@ -96,8 +96,8 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_exceptions);
template <class _Rollback>
struct __exception_guard_noexceptions {
__exception_guard_noexceptions() = delete;
- _LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG explicit __exception_guard_noexceptions(_Rollback) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ _LIBCPP_NODEBUG explicit __exception_guard_noexceptions(_Rollback) {}
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG
__exception_guard_noexceptions(__exception_guard_noexceptions&& __other)
diff --git a/libcxx/include/__utility/forward_like.h b/libcxx/include/__utility/forward_like.h
index 0206ce23a5..ce11b640fc 100644
--- a/libcxx/include/__utility/forward_like.h
+++ b/libcxx/include/__utility/forward_like.h
@@ -34,8 +34,8 @@ template <class _Ap, class _Bp>
using _ForwardLike = _OverrideRef<_Ap&&, _CopyConst<remove_reference_t<_Ap>, remove_reference_t<_Bp>>>;
template <class _Tp, class _Up>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto
-forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept -> _ForwardLike<_Tp, _Up> {
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept
+ -> _ForwardLike<_Tp, _Up> {
return static_cast<_ForwardLike<_Tp, _Up>>(__ux);
}
diff --git a/libcxx/include/__utility/is_pointer_in_range.h b/libcxx/include/__utility/is_pointer_in_range.h
index aa7039b3f0..68cdfea6f9 100644
--- a/libcxx/include/__utility/is_pointer_in_range.h
+++ b/libcxx/include/__utility/is_pointer_in_range.h
@@ -32,8 +32,8 @@ struct __is_less_than_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>()
};
template <class _Tp, class _Up, __enable_if_t<__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
-__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool __is_pointer_in_range(
+ const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
if (__libcpp_is_constant_evaluated()) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__builtin_constant_p(__begin <= __end), "__begin and __end do not form a range");
@@ -48,8 +48,8 @@ __is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
}
template <class _Tp, class _Up, __enable_if_t<!__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool
-__is_pointer_in_range(const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool __is_pointer_in_range(
+ const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
if (__libcpp_is_constant_evaluated())
return false;
diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index ad204ae0d8..2f4908cedd 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -594,9 +594,9 @@ swap(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) noexcept(noexcept(__x
#endif
template <class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
-make_pair(_T1&& __t1, _T2&& __t2) {
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
+ make_pair(_T1&& __t1, _T2&& __t2) {
return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>(
std::forward<_T1>(__t1), std::forward<_T2>(__t2));
}
diff --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp
index 4c38c4df6a..bb49e265ba 100644
--- a/libcxx/src/iostream.cpp
+++ b/libcxx/src/iostream.cpp
@@ -21,7 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-_ALIGNAS_TYPE(istream) _LIBCPP_EXPORTED_FROM_ABI char cin[sizeof(istream)]
+_ALIGNAS_TYPE(istream)
+_LIBCPP_EXPORTED_FROM_ABI char cin[sizeof(istream)]
#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?cin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -31,7 +32,8 @@ _ALIGNAS_TYPE(__stdinbuf<char>) static char __cin[sizeof(__stdinbuf<char>)];
static mbstate_t mb_cin;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(wistream) _LIBCPP_EXPORTED_FROM_ABI char wcin[sizeof(wistream)]
+_ALIGNAS_TYPE(wistream)
+_LIBCPP_EXPORTED_FROM_ABI char wcin[sizeof(wistream)]
# if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?wcin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -41,7 +43,8 @@ _ALIGNAS_TYPE(__stdinbuf<wchar_t>) static char __wcin[sizeof(__stdinbuf<wchar_t>
static mbstate_t mb_wcin;
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(ostream) _LIBCPP_EXPORTED_FROM_ABI char cout[sizeof(ostream)]
+_ALIGNAS_TYPE(ostream)
+_LIBCPP_EXPORTED_FROM_ABI char cout[sizeof(ostream)]
#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?cout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -51,7 +54,8 @@ _ALIGNAS_TYPE(__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
static mbstate_t mb_cout;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(wostream) _LIBCPP_EXPORTED_FROM_ABI char wcout[sizeof(wostream)]
+_ALIGNAS_TYPE(wostream)
+_LIBCPP_EXPORTED_FROM_ABI char wcout[sizeof(wostream)]
# if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?wcout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -61,7 +65,8 @@ _ALIGNAS_TYPE(__stdoutbuf<wchar_t>) static char __wcout[sizeof(__stdoutbuf<wchar
static mbstate_t mb_wcout;
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(ostream) _LIBCPP_EXPORTED_FROM_ABI char cerr[sizeof(ostream)]
+_ALIGNAS_TYPE(ostream)
+_LIBCPP_EXPORTED_FROM_ABI char cerr[sizeof(ostream)]
#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?cerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -71,7 +76,8 @@ _ALIGNAS_TYPE(__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
static mbstate_t mb_cerr;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(wostream) _LIBCPP_EXPORTED_FROM_ABI char wcerr[sizeof(wostream)]
+_ALIGNAS_TYPE(wostream)
+_LIBCPP_EXPORTED_FROM_ABI char wcerr[sizeof(wostream)]
# if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?wcerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -81,7 +87,8 @@ _ALIGNAS_TYPE(__stdoutbuf<wchar_t>) static char __wcerr[sizeof(__stdoutbuf<wchar
static mbstate_t mb_wcerr;
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(ostream) _LIBCPP_EXPORTED_FROM_ABI char clog[sizeof(ostream)]
+_ALIGNAS_TYPE(ostream)
+_LIBCPP_EXPORTED_FROM_ABI char clog[sizeof(ostream)]
#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?clog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
@@ -89,7 +96,8 @@ _ALIGNAS_TYPE(ostream) _LIBCPP_EXPORTED_FROM_ABI char clog[sizeof(ostream)]
;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE(wostream) _LIBCPP_EXPORTED_FROM_ABI char wclog[sizeof(wostream)]
+_ALIGNAS_TYPE(wostream)
+_LIBCPP_EXPORTED_FROM_ABI char wclog[sizeof(wostream)]
# if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
__asm__("?wclog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR
"@std@@@12 at A")
diff --git a/libcxx/src/support/ibm/mbsnrtowcs.cpp b/libcxx/src/support/ibm/mbsnrtowcs.cpp
index b299ec6405..122dc5ed89 100644
--- a/libcxx/src/support/ibm/mbsnrtowcs.cpp
+++ b/libcxx/src/support/ibm/mbsnrtowcs.cpp
@@ -18,12 +18,12 @@
// Returns (size_t) -1 when an invalid sequence is encountered.
// Leaves *`src` pointing to the next character to convert or NULL
// if a null character was converted from *`src`.
-_LIBCPP_EXPORTED_FROM_ABI size_t
-mbsnrtowcs(wchar_t* __restrict dst,
- const char** __restrict src,
- size_t src_size_bytes,
- size_t max_dest_chars,
- mbstate_t* __restrict ps) {
+_LIBCPP_EXPORTED_FROM_ABI size_t mbsnrtowcs(
+ wchar_t* __restrict dst,
+ const char** __restrict src,
+ size_t src_size_bytes,
+ size_t max_dest_chars,
+ mbstate_t* __restrict ps) {
const size_t terminated_sequence = static_cast<size_t>(0);
const size_t invalid_sequence = static_cast<size_t>(-1);
const size_t incomplete_sequence = static_cast<size_t>(-2);
diff --git a/libcxx/src/support/ibm/wcsnrtombs.cpp b/libcxx/src/support/ibm/wcsnrtombs.cpp
index 5ffba6e4d7..f037215233 100644
--- a/libcxx/src/support/ibm/wcsnrtombs.cpp
+++ b/libcxx/src/support/ibm/wcsnrtombs.cpp
@@ -17,12 +17,12 @@
// converted from *src, excluding the null terminator.
// Returns (size_t) -1 if an error occurs and sets errno.
// If `dst` is NULL, `dst_size_bytes` is ignored and no bytes are copied to `dst`.
-_LIBCPP_EXPORTED_FROM_ABI size_t
-wcsnrtombs(char* __restrict dst,
- const wchar_t** __restrict src,
- size_t max_source_chars,
- size_t dst_size_bytes,
- mbstate_t* __restrict ps) {
+_LIBCPP_EXPORTED_FROM_ABI size_t wcsnrtombs(
+ char* __restrict dst,
+ const wchar_t** __restrict src,
+ size_t max_source_chars,
+ size_t dst_size_bytes,
+ mbstate_t* __restrict ps) {
const size_t invalid_wchar = static_cast<size_t>(-1);
size_t source_converted;
``````````
</details>
https://github.com/llvm/llvm-project/pull/79214
More information about the libcxx-commits
mailing list