diff --git a/libcxx/include/__cxx03/__format/buffer.h b/libcxx/include/__cxx03/__format/buffer.h index 167b06d7fd226..c94dcc0ca2526 100644 --- a/libcxx/include/__cxx03/__format/buffer.h +++ b/libcxx/include/__cxx03/__format/buffer.h @@ -488,8 +488,8 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> { /// The buffer that counts and limits the number of insertions. template requires(output_iterator<_OutIt, const _CharT&>) -struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final - : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> { +struct _LIBCPP_TEMPLATE_VIS +__format_to_n_buffer final : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> { using _Base = __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>; using _Size = iter_difference_t<_OutIt>; diff --git a/libcxx/include/__cxx03/__format/container_adaptor.h b/libcxx/include/__cxx03/__format/container_adaptor.h index 42c0d14be61a8..6d72352f98332 100644 --- a/libcxx/include/__cxx03/__format/container_adaptor.h +++ b/libcxx/include/__cxx03/__format/container_adaptor.h @@ -55,16 +55,16 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_container_adaptor { }; template _Container> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_container_adaptor, _CharT> {}; +struct _LIBCPP_TEMPLATE_VIS +formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; template struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; template _Container> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_container_adaptor, _CharT> {}; +struct _LIBCPP_TEMPLATE_VIS +formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; #endif //_LIBCPP_STD_VER >= 23 diff --git a/libcxx/include/__cxx03/__format/formatter_output.h b/libcxx/include/__cxx03/__format/formatter_output.h index 1f3ab7f2ff692..8f30a8af458d1 100644 --- a/libcxx/include/__cxx03/__format/formatter_output.h +++ b/libcxx/include/__cxx03/__format/formatter_output.h @@ -100,8 +100,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 auto __out_it) -> decltype(__out_it) { +_LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator auto __out_it) + -> decltype(__out_it) { if constexpr (std::same_as>>) { __out_it.__get_container()->__copy(__str); return __out_it; @@ -116,16 +116,16 @@ __copy(basic_string_view<_CharT> __str, output_iterator auto _ template ::value_type, __fmt_char_type _OutCharT = _CharT> -_LIBCPP_HIDE_FROM_ABI auto -__copy(_Iterator __first, _Iterator __last, output_iterator auto __out_it) -> decltype(__out_it) { +_LIBCPP_HIDE_FROM_ABI auto __copy(_Iterator __first, _Iterator __last, output_iterator auto __out_it) + -> decltype(__out_it) { return __formatter::__copy(basic_string_view{__first, __last}, std::move(__out_it)); } template ::value_type, __fmt_char_type _OutCharT = _CharT> -_LIBCPP_HIDE_FROM_ABI auto -__copy(_Iterator __first, size_t __n, output_iterator auto __out_it) -> decltype(__out_it) { +_LIBCPP_HIDE_FROM_ABI auto __copy(_Iterator __first, size_t __n, output_iterator auto __out_it) + -> decltype(__out_it) { return __formatter::__copy(basic_string_view{std::to_address(__first), __n}, std::move(__out_it)); } @@ -136,11 +136,9 @@ template ::value_type, __fmt_char_type _OutCharT = _CharT, class _UnaryOperation> -_LIBCPP_HIDE_FROM_ABI auto -__transform(_Iterator __first, - _Iterator __last, - output_iterator auto __out_it, - _UnaryOperation __operation) -> decltype(__out_it) { +_LIBCPP_HIDE_FROM_ABI auto __transform( + _Iterator __first, _Iterator __last, output_iterator auto __out_it, _UnaryOperation __operation) + -> decltype(__out_it) { if constexpr (std::same_as>>) { __out_it.__get_container()->__transform(__first, __last, std::move(__operation)); return __out_it; diff --git a/libcxx/include/__cxx03/__format/formatter_string.h b/libcxx/include/__cxx03/__format/formatter_string.h index 024f7936875ec..8c766db8c0680 100644 --- a/libcxx/include/__cxx03/__format/formatter_string.h +++ b/libcxx/include/__cxx03/__format/formatter_string.h @@ -118,8 +118,8 @@ struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> : public __formatte // Formatter std::string. template <__fmt_char_type _CharT, class _Traits, class _Allocator> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_string<_CharT> { +struct _LIBCPP_TEMPLATE_VIS +formatter, _CharT> : public __formatter_string<_CharT> { using _Base = __formatter_string<_CharT>; template diff --git a/libcxx/include/__cxx03/__format/formatter_tuple.h b/libcxx/include/__cxx03/__format/formatter_tuple.h index 0a5ce4e070a64..0d26c4ccf53b1 100644 --- a/libcxx/include/__cxx03/__format/formatter_tuple.h +++ b/libcxx/include/__cxx03/__format/formatter_tuple.h @@ -136,12 +136,12 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_tuple { }; template <__fmt_char_type _CharT, formattable<_CharT>... _Args> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {}; +struct _LIBCPP_TEMPLATE_VIS +formatter, _CharT> : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {}; template <__fmt_char_type _CharT, formattable<_CharT>... _Args> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {}; +struct _LIBCPP_TEMPLATE_VIS +formatter, _CharT> : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {}; #endif //_LIBCPP_STD_VER >= 23 diff --git a/libcxx/include/__cxx03/__functional/bind_back.h b/libcxx/include/__cxx03/__functional/bind_back.h index 2e333b1b14d6a..caf222bf7ba09 100644 --- a/libcxx/include/__cxx03/__functional/bind_back.h +++ b/libcxx/include/__cxx03/__functional/bind_back.h @@ -52,7 +52,7 @@ struct __bind_back_t : __perfect_forward<__bind_back_op template requires is_constructible_v, _Fn> && is_move_constructible_v> && - (is_constructible_v, _Args> && ...) && (is_move_constructible_v> && ...) + (is_constructible_v, _Args> && ...) && (is_move_constructible_v> && ...) _LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) noexcept( noexcept(__bind_back_t, tuple...>>( std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)))) diff --git a/libcxx/include/__cxx03/__functional/bind_front.h b/libcxx/include/__cxx03/__functional/bind_front.h index 6447c2d1bc2eb..2610cb211cd20 100644 --- a/libcxx/include/__cxx03/__functional/bind_front.h +++ b/libcxx/include/__cxx03/__functional/bind_front.h @@ -29,8 +29,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD struct __bind_front_op { template - _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/__cxx03/__functional/binder1st.h b/libcxx/include/__cxx03/__functional/binder1st.h index 21c136ff16d8c..2b00629fa43be 100644 --- a/libcxx/include/__cxx03/__functional/binder1st.h +++ b/libcxx/include/__cxx03/__functional/binder1st.h @@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st - : public __unary_function { +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 +binder1st : public __unary_function { protected: _Operation op; typename _Operation::first_argument_type value; diff --git a/libcxx/include/__cxx03/__functional/binder2nd.h b/libcxx/include/__cxx03/__functional/binder2nd.h index 397215b3d9e11..6c65c87f481bd 100644 --- a/libcxx/include/__cxx03/__functional/binder2nd.h +++ b/libcxx/include/__cxx03/__functional/binder2nd.h @@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd - : public __unary_function { +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 +binder2nd : public __unary_function { protected: _Operation op; typename _Operation::second_argument_type value; diff --git a/libcxx/include/__cxx03/__functional/function.h b/libcxx/include/__cxx03/__functional/function.h index 891652f1da25f..9158db6472299 100644 --- a/libcxx/include/__cxx03/__functional/function.h +++ b/libcxx/include/__cxx03/__functional/function.h @@ -114,7 +114,7 @@ _LIBCPP_HIDE_FROM_ABI bool __not_null(_Fp* __ptr) { } template -_LIBCPP_HIDE_FROM_ABI bool __not_null(_Ret _Class::*__ptr) { +_LIBCPP_HIDE_FROM_ABI bool __not_null(_Ret _Class::* __ptr) { return __ptr; } @@ -492,7 +492,7 @@ template struct __use_small_storage : public integral_constant< bool, - sizeof(_Fun) <= sizeof(__policy_storage)&& _LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) && + sizeof(_Fun) <= sizeof(__policy_storage) && _LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) && is_trivially_copy_constructible<_Fun>::value && is_trivially_destructible<_Fun>::value> {}; // Policy contains information about how to copy, destroy, and move the diff --git a/libcxx/include/__cxx03/__functional/mem_fn.h b/libcxx/include/__cxx03/__functional/mem_fn.h index b3257f8302f1b..be497bba90ef9 100644 --- a/libcxx/include/__cxx03/__functional/mem_fn.h +++ b/libcxx/include/__cxx03/__functional/mem_fn.h @@ -45,7 +45,7 @@ class __mem_fn : public __weak_result_type<_Tp> { }; template -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn<_Rp _Tp::*> mem_fn(_Rp _Tp::*__pm) _NOEXCEPT { +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn<_Rp _Tp::*> mem_fn(_Rp _Tp::* __pm) _NOEXCEPT { return __mem_fn<_Rp _Tp::*>(__pm); } diff --git a/libcxx/include/__cxx03/__functional/mem_fun_ref.h b/libcxx/include/__cxx03/__functional/mem_fun_ref.h index ef962231dc92b..75c095fe8fd77 100644 --- a/libcxx/include/__cxx03/__functional/mem_fun_ref.h +++ b/libcxx/include/__cxx03/__functional/mem_fun_ref.h @@ -89,8 +89,8 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public }; template -class _LIBCPP_TEMPLATE_VIS -_LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function { +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 +const_mem_fun1_t : public __binary_function { _Sp (_Tp::*__p_)(_Ap) const; public: diff --git a/libcxx/include/__cxx03/__functional/operations.h b/libcxx/include/__cxx03/__functional/operations.h index ddbe71bdc8b68..6708da1bd4b0e 100644 --- a/libcxx/include/__cxx03/__functional/operations.h +++ b/libcxx/include/__cxx03/__functional/operations.h @@ -206,8 +206,8 @@ template <> struct _LIBCPP_TEMPLATE_VIS bit_and { template _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; @@ -424,8 +424,8 @@ template <> struct _LIBCPP_TEMPLATE_VIS greater_equal { template _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/__cxx03/__functional/pointer_to_binary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h index 72474255d7fe2..603fb44378c58 100644 --- a/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h +++ b/libcxx/include/__cxx03/__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 _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/__cxx03/__functional/pointer_to_unary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h index 8540ad07f3ec0..026bece81a5e5 100644 --- a/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h +++ b/libcxx/include/__cxx03/__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 _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/__cxx03/__functional/unary_negate.h b/libcxx/include/__cxx03/__functional/unary_negate.h index 4d527865f378c..73da57aa2e84e 100644 --- a/libcxx/include/__cxx03/__functional/unary_negate.h +++ b/libcxx/include/__cxx03/__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 _LIBCPP_TEMPLATE_VIS -_LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function { +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 +unary_negate : public __unary_function { _Predicate __pred_; public: diff --git a/libcxx/include/__cxx03/__iterator/access.h b/libcxx/include/__cxx03/__iterator/access.h index 2d61d4a879d4f..0e7a97689ceb6 100644 --- a/libcxx/include/__cxx03/__iterator/access.h +++ b/libcxx/include/__cxx03/__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 -_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/__cxx03/__iterator/concepts.h b/libcxx/include/__cxx03/__iterator/concepts.h index af7d0c9a0541d..5bb67a7b24ef8 100644 --- a/libcxx/include/__cxx03/__iterator/concepts.h +++ b/libcxx/include/__cxx03/__iterator/concepts.h @@ -70,10 +70,10 @@ using iter_common_reference_t = common_reference_t, iter_v // [iterator.concept.writable] template concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) { - *__o = std::forward<_Tp>(__t); // not required to be equality-preserving - *std::forward<_Out>(__o) = std::forward<_Tp>(__t); // not required to be equality-preserving - const_cast&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving - const_cast&&>(*std::forward<_Out>(__o)) = + *__o = std::forward<_Tp>(__t); // not required to be equality-preserving + *std::forward<_Out>(__o) = std::forward<_Tp>(__t); // not required to be equality-preserving + const_cast &&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving + const_cast &&>(*std::forward<_Out>(__o)) = std::forward<_Tp>(__t); // not required to be equality-preserving }; diff --git a/libcxx/include/__cxx03/__iterator/empty.h b/libcxx/include/__cxx03/__iterator/empty.h index 20f505e789c13..f39cedfd33fd5 100644 --- a/libcxx/include/__cxx03/__iterator/empty.h +++ b/libcxx/include/__cxx03/__iterator/empty.h @@ -23,8 +23,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 17 template -[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto -empty(const _Cont& __c) noexcept(noexcept(__c.empty())) -> decltype(__c.empty()) { +[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto empty(const _Cont& __c) noexcept(noexcept(__c.empty())) + -> decltype(__c.empty()) { return __c.empty(); } diff --git a/libcxx/include/__cxx03/__iterator/move_iterator.h b/libcxx/include/__cxx03/__iterator/move_iterator.h index 0fbcfdd0c1d9f..755ca33e208d5 100644 --- a/libcxx/include/__cxx03/__iterator/move_iterator.h +++ b/libcxx/include/__cxx03/__iterator/move_iterator.h @@ -291,8 +291,8 @@ operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) { #if _LIBCPP_STD_VER >= 20 template _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/__cxx03/__iterator/reverse_iterator.h b/libcxx/include/__cxx03/__iterator/reverse_iterator.h index b95ca27ff5fb0..70415114b2765 100644 --- a/libcxx/include/__cxx03/__iterator/reverse_iterator.h +++ b/libcxx/include/__cxx03/__iterator/reverse_iterator.h @@ -284,8 +284,8 @@ operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& #ifndef _LIBCPP_CXX03_LANG template 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 diff --git a/libcxx/include/__cxx03/__iterator/size.h b/libcxx/include/__cxx03/__iterator/size.h index b0374a6c59e1c..f01cee4b6ea77 100644 --- a/libcxx/include/__cxx03/__iterator/size.h +++ b/libcxx/include/__cxx03/__iterator/size.h @@ -35,9 +35,9 @@ _LIBCPP_HIDE_FROM_ABI constexpr size_t size(const _Tp (&)[_Sz]) noexcept { # if _LIBCPP_STD_VER >= 20 template -_LIBCPP_HIDE_FROM_ABI constexpr auto -ssize(const _Cont& __c) noexcept(noexcept(static_cast>>( - __c.size()))) -> common_type_t> { +_LIBCPP_HIDE_FROM_ABI constexpr auto ssize(const _Cont& __c) noexcept( + noexcept(static_cast>>(__c.size()))) + -> common_type_t> { return static_cast>>(__c.size()); } diff --git a/libcxx/include/__cxx03/__mdspan/mdspan.h b/libcxx/include/__cxx03/__mdspan/mdspan.h index a1f6f00d61b71..d1aa2585d1cbb 100644 --- a/libcxx/include/__cxx03/__mdspan/mdspan.h +++ b/libcxx/include/__cxx03/__mdspan/mdspan.h @@ -269,13 +269,13 @@ class mdspan { # if _LIBCPP_STD_VER >= 26 template requires((is_convertible_v<_OtherIndexTypes, size_t> && ...) && (sizeof...(_OtherIndexTypes) > 0)) -explicit mdspan(_ElementType*, - _OtherIndexTypes...) -> mdspan<_ElementType, extents...>>; +explicit mdspan(_ElementType*, _OtherIndexTypes...) + -> mdspan<_ElementType, extents...>>; # else template requires((is_convertible_v<_OtherIndexTypes, size_t> && ...) && (sizeof...(_OtherIndexTypes) > 0)) -explicit mdspan(_ElementType*, - _OtherIndexTypes...) -> mdspan<_ElementType, dextents>; +explicit mdspan(_ElementType*, _OtherIndexTypes...) + -> mdspan<_ElementType, dextents>; # endif template diff --git a/libcxx/include/__cxx03/__memory/allocator.h b/libcxx/include/__cxx03/__memory/allocator.h index 06f270a0c008c..9f3d2f4da2c12 100644 --- a/libcxx/include/__cxx03/__memory/allocator.h +++ b/libcxx/include/__cxx03/__memory/allocator.h @@ -172,8 +172,8 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if::v // TODO(LLVM 20): Remove the escape hatch #ifdef _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST template -class _LIBCPP_TEMPLATE_VIS allocator - : private __non_trivial_if::value, allocator > { +class _LIBCPP_TEMPLATE_VIS +allocator : private __non_trivial_if::value, allocator > { static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types"); public: diff --git a/libcxx/include/__cxx03/__memory/pointer_traits.h b/libcxx/include/__cxx03/__memory/pointer_traits.h index f1206836676d4..1d7a352fe6ebc 100644 --- a/libcxx/include/__cxx03/__memory/pointer_traits.h +++ b/libcxx/include/__cxx03/__memory/pointer_traits.h @@ -243,8 +243,8 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(_Tp* __p) noexcept { } template -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/__cxx03/__ranges/access.h b/libcxx/include/__cxx03/__ranges/access.h index 23b61946a16bb..e11cbfd488ee9 100644 --- a/libcxx/include/__cxx03/__ranges/access.h +++ b/libcxx/include/__cxx03/__ranges/access.h @@ -191,8 +191,9 @@ struct __fn { template requires is_rvalue_reference_v<_Tp&&> - [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept( - noexcept(ranges::end(static_cast(__t)))) -> decltype(ranges::end(static_cast(__t))) { + [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(ranges::end(static_cast(__t)))) + -> decltype(ranges::end(static_cast(__t))) { return ranges::end(static_cast(__t)); } }; diff --git a/libcxx/include/__cxx03/__ranges/all.h b/libcxx/include/__cxx03/__ranges/all.h index 57497f83478b5..52c4b1df74b6b 100644 --- a/libcxx/include/__cxx03/__ranges/all.h +++ b/libcxx/include/__cxx03/__ranges/all.h @@ -39,8 +39,9 @@ namespace __all { struct __fn : __range_adaptor_closure<__fn> { template requires ranges::view> - [[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/__cxx03/__ranges/common_view.h b/libcxx/include/__cxx03/__ranges/common_view.h index e7022ff63abba..a6bc036328bb2 100644 --- a/libcxx/include/__cxx03/__ranges/common_view.h +++ b/libcxx/include/__cxx03/__ranges/common_view.h @@ -114,14 +114,16 @@ namespace __common { struct __fn : __range_adaptor_closure<__fn> { template 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 - [[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/__cxx03/__ranges/counted.h b/libcxx/include/__cxx03/__ranges/counted.h index a4a11cd0064b9..048bc00f25509 100644 --- a/libcxx/include/__cxx03/__ranges/counted.h +++ b/libcxx/include/__cxx03/__ranges/counted.h @@ -51,8 +51,9 @@ struct __fn { } template - _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/__cxx03/__ranges/data.h b/libcxx/include/__cxx03/__ranges/data.h index 80e473d218614..1f31f3e8ee65c 100644 --- a/libcxx/include/__cxx03/__ranges/data.h +++ b/libcxx/include/__cxx03/__ranges/data.h @@ -83,8 +83,9 @@ struct __fn { template requires is_rvalue_reference_v<_Tp&&> - [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept( - noexcept(ranges::data(static_cast(__t)))) -> decltype(ranges::data(static_cast(__t))) { + [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(ranges::data(static_cast(__t)))) + -> decltype(ranges::data(static_cast(__t))) { return ranges::data(static_cast(__t)); } }; diff --git a/libcxx/include/__cxx03/__ranges/drop_view.h b/libcxx/include/__cxx03/__ranges/drop_view.h index 78e0a26e4c7e9..c4b8f43475f66 100644 --- a/libcxx/include/__cxx03/__ranges/drop_view.h +++ b/libcxx/include/__cxx03/__ranges/drop_view.h @@ -289,14 +289,14 @@ struct __fn { template > _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/__cxx03/__ranges/lazy_split_view.h b/libcxx/include/__cxx03/__ranges/lazy_split_view.h index 8dc05e0ec6f95..fcf389877a250 100644 --- a/libcxx/include/__cxx03/__ranges/lazy_split_view.h +++ b/libcxx/include/__cxx03/__ranges/lazy_split_view.h @@ -103,7 +103,7 @@ class lazy_split_view : public view_interface> _LIBCPP_HIDE_FROM_ABI constexpr auto begin() { if constexpr (forward_range<_View>) { - return __outer_iterator < __simple_view<_View> && __simple_view < _Pattern >> {*this, ranges::begin(__base_)}; + return __outer_iterator< __simple_view<_View> && __simple_view< _Pattern >>{*this, ranges::begin(__base_)}; } else { __current_.__emplace(ranges::begin(__base_)); return __outer_iterator{*this}; @@ -119,7 +119,7 @@ class lazy_split_view : public view_interface> _LIBCPP_HIDE_FROM_ABI constexpr auto end() requires forward_range<_View> && common_range<_View> { - return __outer_iterator < __simple_view<_View> && __simple_view < _Pattern >> {*this, ranges::end(__base_)}; + return __outer_iterator< __simple_view<_View> && __simple_view< _Pattern >>{*this, ranges::end(__base_)}; } _LIBCPP_HIDE_FROM_ABI constexpr auto end() const { @@ -403,8 +403,8 @@ template lazy_split_view(_Range&&, _Pattern&&) -> lazy_split_view, views::all_t<_Pattern>>; template -lazy_split_view(_Range&&, - range_value_t<_Range>) -> lazy_split_view, single_view>>; +lazy_split_view(_Range&&, range_value_t<_Range>) + -> lazy_split_view, single_view>>; namespace views { namespace __lazy_split_view { diff --git a/libcxx/include/__cxx03/__ranges/rend.h b/libcxx/include/__cxx03/__ranges/rend.h index aa7e4a0ba396a..5e3973d110c16 100644 --- a/libcxx/include/__cxx03/__ranges/rend.h +++ b/libcxx/include/__cxx03/__ranges/rend.h @@ -104,8 +104,9 @@ struct __fn { template requires is_rvalue_reference_v<_Tp&&> - [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept( - noexcept(ranges::rend(static_cast(__t)))) -> decltype(ranges::rend(static_cast(__t))) { + [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(ranges::rend(static_cast(__t)))) + -> decltype(ranges::rend(static_cast(__t))) { return ranges::rend(static_cast(__t)); } }; diff --git a/libcxx/include/__cxx03/__ranges/reverse_view.h b/libcxx/include/__cxx03/__ranges/reverse_view.h index 53a0e9d213c5b..aae39a53e504d 100644 --- a/libcxx/include/__cxx03/__ranges/reverse_view.h +++ b/libcxx/include/__cxx03/__ranges/reverse_view.h @@ -181,8 +181,9 @@ struct __fn : __range_adaptor_closure<__fn> { template requires(!__is_reverse_view> && !__is_sized_reverse_subrange> && !__is_unsized_reverse_subrange>) - [[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/__cxx03/__ranges/subrange.h b/libcxx/include/__cxx03/__ranges/subrange.h index e077d221ed202..de2c3c05aae2a 100644 --- a/libcxx/include/__cxx03/__ranges/subrange.h +++ b/libcxx/include/__cxx03/__ranges/subrange.h @@ -200,11 +200,12 @@ template _Sent> subrange(_Iter, _Sent, make_unsigned_t>) -> subrange<_Iter, _Sent, subrange_kind::sized>; template -subrange(_Range&&) -> subrange, - sentinel_t<_Range>, - (sized_range<_Range> || sized_sentinel_for, iterator_t<_Range>>) - ? subrange_kind::sized - : subrange_kind::unsized>; +subrange(_Range&&) + -> subrange, + sentinel_t<_Range>, + (sized_range<_Range> || sized_sentinel_for, iterator_t<_Range>>) + ? subrange_kind::sized + : subrange_kind::unsized>; template subrange(_Range&&, make_unsigned_t>) diff --git a/libcxx/include/__cxx03/__string/char_traits.h b/libcxx/include/__cxx03/__string/char_traits.h index e962d986b2785..dd0ce453abfd6 100644 --- a/libcxx/include/__cxx03/__string/char_traits.h +++ b/libcxx/include/__cxx03/__string/char_traits.h @@ -259,8 +259,8 @@ struct _LIBCPP_TEMPLATE_VIS char_traits : __char_traits_base -struct _LIBCPP_TEMPLATE_VIS char_traits - : __char_traits_base(EOF)> { +struct _LIBCPP_TEMPLATE_VIS +char_traits : __char_traits_base(EOF)> { static _LIBCPP_HIDE_FROM_ABI constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) noexcept { return std::__constexpr_memcmp(__s1, __s2, __element_count(__n)); @@ -279,8 +279,8 @@ struct _LIBCPP_TEMPLATE_VIS char_traits #endif // _LIBCPP_HAS_NO_CHAR8_T template <> -struct _LIBCPP_TEMPLATE_VIS char_traits - : __char_traits_base(0xFFFF)> { +struct _LIBCPP_TEMPLATE_VIS +char_traits : __char_traits_base(0xFFFF)> { _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT; @@ -314,8 +314,8 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits::length(const } template <> -struct _LIBCPP_TEMPLATE_VIS char_traits - : __char_traits_base(0xFFFFFFFF)> { +struct _LIBCPP_TEMPLATE_VIS +char_traits : __char_traits_base(0xFFFFFFFF)> { _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT; diff --git a/libcxx/include/__cxx03/__thread/support/c11.h b/libcxx/include/__cxx03/__thread/support/c11.h index 4ae6f841a9430..3612d5c8db2d3 100644 --- a/libcxx/include/__cxx03/__thread/support/c11.h +++ b/libcxx/include/__cxx03/__thread/support/c11.h @@ -31,7 +31,8 @@ using __libcpp_timespec_t = ::timespec; typedef mtx_t __libcpp_mutex_t; // mtx_t is a struct so using {} for initialization is valid. #define _LIBCPP_MUTEX_INITIALIZER \ - {} + { \ + } typedef mtx_t __libcpp_recursive_mutex_t; @@ -82,7 +83,8 @@ inline _LIBCPP_HIDE_FROM_ABI int __libcpp_mutex_destroy(__libcpp_mutex_t* __m) { typedef cnd_t __libcpp_condvar_t; // cnd_t is a struct so using {} for initialization is valid. #define _LIBCPP_CONDVAR_INITIALIZER \ - {} + { \ + } inline _LIBCPP_HIDE_FROM_ABI int __libcpp_condvar_signal(__libcpp_condvar_t* __cv) { return cnd_signal(__cv) == thrd_success ? 0 : EINVAL; diff --git a/libcxx/include/__cxx03/__tuple/sfinae_helpers.h b/libcxx/include/__cxx03/__tuple/sfinae_helpers.h index 4fbe87d6e9a5b..1384d17048752 100644 --- a/libcxx/include/__cxx03/__tuple/sfinae_helpers.h +++ b/libcxx/include/__cxx03/__tuple/sfinae_helpers.h @@ -35,8 +35,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD struct __tuple_sfinae_base { template