-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libc++][NFC] Re-run libcxx/include through clang-format #132407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a small re-adjustment of libcxx/include with the current version of clang-format we use in the CI.
|
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThis is a small re-adjustment of libcxx/include with the current version of clang-format we use in the CI. Patch is 144.27 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/132407.diff 129 Files Affected:
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 <class _OutIt, __fmt_char_type _CharT>
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 <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS formatter<queue<_Tp, _Container>, _CharT>
- : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS
+formatter<queue<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
template <class _CharT, class _Tp, class _Container, class _Compare>
struct _LIBCPP_TEMPLATE_VIS formatter<priority_queue<_Tp, _Container, _Compare>, _CharT>
: public __formatter_container_adaptor<priority_queue<_Tp, _Container, _Compare>, _CharT> {};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS formatter<stack<_Tp, _Container>, _CharT>
- : public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS
+formatter<stack<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<stack<_Tp, _Container>, _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<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;
@@ -116,16 +116,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));
}
@@ -136,11 +136,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/__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<basic_string<_CharT, _Traits, _Allocator>, _CharT>
- : public __formatter_string<_CharT> {
+struct _LIBCPP_TEMPLATE_VIS
+formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT> : public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
template <class _FormatContext>
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<pair<_Args...>, _CharT>
- : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS
+formatter<pair<_Args...>, _CharT> : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS formatter<tuple<_Args...>, _CharT>
- : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS
+formatter<tuple<_Args...>, _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<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/__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 <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/__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 _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
- : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
+binder1st : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
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 _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
- : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
+binder2nd : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
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 <class _Ret, class _Class>
-_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 <typename _Fun>
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 <class _Rp, class _Tp>
-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 _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/__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<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;
@@ -424,8 +424,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;
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 _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/__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 _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/__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 _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/__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 <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/__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_reference_t<_Tp>, iter_v
// [iterator.concept.writable]
template <class _Out, class _Tp>
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<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
- const_cast<const iter_reference_t<_Out>&&>(*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<const iter_reference_t<_Out> &&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
+ const_cast<const iter_reference_t<_Out> &&>(*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 <class _Cont>
-[[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 <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<_I...
[truncated]
|
You can test this locally with the following command:git-clang-format --diff c4eec9eb52c604c1d54d86181bcce92f3cbc61ec 6dd75bb0781feed276ac70ad5311fab6b0b0f185 --extensions h, -- libcxx/include/__cxx03/__format/buffer.h libcxx/include/__cxx03/__format/container_adaptor.h libcxx/include/__cxx03/__format/formatter_output.h libcxx/include/__cxx03/__format/formatter_string.h libcxx/include/__cxx03/__format/formatter_tuple.h libcxx/include/__cxx03/__functional/bind_back.h libcxx/include/__cxx03/__functional/bind_front.h libcxx/include/__cxx03/__functional/binder1st.h libcxx/include/__cxx03/__functional/binder2nd.h libcxx/include/__cxx03/__functional/function.h libcxx/include/__cxx03/__functional/mem_fn.h libcxx/include/__cxx03/__functional/mem_fun_ref.h libcxx/include/__cxx03/__functional/operations.h libcxx/include/__cxx03/__functional/pointer_to_binary_function.h libcxx/include/__cxx03/__functional/pointer_to_unary_function.h libcxx/include/__cxx03/__functional/unary_negate.h libcxx/include/__cxx03/__iterator/access.h libcxx/include/__cxx03/__iterator/concepts.h libcxx/include/__cxx03/__iterator/empty.h libcxx/include/__cxx03/__iterator/move_iterator.h libcxx/include/__cxx03/__iterator/reverse_iterator.h libcxx/include/__cxx03/__iterator/size.h libcxx/include/__cxx03/__mdspan/mdspan.h libcxx/include/__cxx03/__memory/allocator.h libcxx/include/__cxx03/__memory/pointer_traits.h libcxx/include/__cxx03/__ranges/access.h libcxx/include/__cxx03/__ranges/all.h libcxx/include/__cxx03/__ranges/common_view.h libcxx/include/__cxx03/__ranges/counted.h libcxx/include/__cxx03/__ranges/data.h libcxx/include/__cxx03/__ranges/drop_view.h libcxx/include/__cxx03/__ranges/lazy_split_view.h libcxx/include/__cxx03/__ranges/rend.h libcxx/include/__cxx03/__ranges/reverse_view.h libcxx/include/__cxx03/__ranges/subrange.h libcxx/include/__cxx03/__string/char_traits.h libcxx/include/__cxx03/__thread/support/c11.h libcxx/include/__cxx03/__tuple/sfinae_helpers.h libcxx/include/__cxx03/__tuple/tuple_size.h libcxx/include/__cxx03/__type_traits/common_type.h libcxx/include/__cxx03/__type_traits/invoke.h libcxx/include/__cxx03/__type_traits/is_arithmetic.h libcxx/include/__cxx03/__type_traits/is_constructible.h libcxx/include/__cxx03/__type_traits/is_literal_type.h libcxx/include/__cxx03/__type_traits/is_nothrow_constructible.h libcxx/include/__cxx03/__type_traits/is_nothrow_destructible.h libcxx/include/__cxx03/__type_traits/is_pointer.h libcxx/include/__cxx03/__type_traits/is_trivially_constructible.h libcxx/include/__cxx03/__type_traits/is_trivially_destructible.h libcxx/include/__cxx03/__utility/forward_like.h libcxx/include/__cxx03/bitset libcxx/include/__cxx03/codecvt libcxx/include/__cxx03/condition_variable libcxx/include/__cxx03/cwchar libcxx/include/__cxx03/istream libcxx/include/__cxx03/map libcxx/include/__cxx03/queue libcxx/include/__cxx03/regex libcxx/include/__cxx03/set libcxx/include/__cxx03/shared_mutex libcxx/include/__cxx03/span libcxx/include/__cxx03/stack libcxx/include/__cxx03/string libcxx/include/__cxx03/tuple libcxx/include/__cxx03/unordered_map libcxx/include/__cxx03/unordered_set libcxx/include/__cxx03/variant libcxx/include/__cxx03/vector libcxx/include/__format/container_adaptor.h libcxx/include/__format/formatter_output.h libcxx/include/__format/formatter_string.h libcxx/include/__format/formatter_tuple.h libcxx/include/__functional/bind_back.h libcxx/include/__functional/bind_front.h libcxx/include/__functional/binder1st.h libcxx/include/__functional/binder2nd.h libcxx/include/__functional/function.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/concepts.h libcxx/include/__iterator/empty.h libcxx/include/__iterator/move_iterator.h libcxx/include/__iterator/reverse_iterator.h libcxx/include/__iterator/size.h libcxx/include/__mdspan/mdspan.h libcxx/include/__memory/pointer_traits.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/__string/char_traits.h libcxx/include/__thread/support/c11.h libcxx/include/__tuple/sfinae_helpers.h libcxx/include/__tuple/tuple_size.h libcxx/include/__type_traits/common_type.h libcxx/include/__type_traits/enable_if.h libcxx/include/__type_traits/is_nothrow_destructible.h libcxx/include/__type_traits/is_pointer.h libcxx/include/__type_traits/result_of.h libcxx/include/__utility/forward_like.h libcxx/include/__vector/vector_bool.h libcxx/include/bitset libcxx/include/codecvt libcxx/include/condition_variable libcxx/include/cwchar libcxx/include/istream libcxx/include/locale libcxx/include/map libcxx/include/queue libcxx/include/regex libcxx/include/set libcxx/include/shared_mutex libcxx/include/span libcxx/include/stack libcxx/include/tuple libcxx/include/unordered_map libcxx/include/unordered_set libcxx/include/variantView the diff from clang-format here.diff --git a/libcxx/include/__cxx03/__format/buffer.h b/libcxx/include/__cxx03/__format/buffer.h
index c94dcc0ca2..167b06d7fd 100644
--- a/libcxx/include/__cxx03/__format/buffer.h
+++ b/libcxx/include/__cxx03/__format/buffer.h
@@ -488,8 +488,8 @@ protected:
/// The buffer that counts and limits the number of insertions.
template <class _OutIt, __fmt_char_type _CharT>
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 6d72352f98..42c0d14be6 100644
--- a/libcxx/include/__cxx03/__format/container_adaptor.h
+++ b/libcxx/include/__cxx03/__format/container_adaptor.h
@@ -55,16 +55,16 @@ public:
};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<queue<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<queue<_Tp, _Container>, _CharT>
+ : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
template <class _CharT, class _Tp, class _Container, class _Compare>
struct _LIBCPP_TEMPLATE_VIS formatter<priority_queue<_Tp, _Container, _Compare>, _CharT>
: public __formatter_container_adaptor<priority_queue<_Tp, _Container, _Compare>, _CharT> {};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<stack<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<stack<_Tp, _Container>, _CharT>
+ : public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
#endif //_LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__cxx03/__format/formatter_string.h b/libcxx/include/__cxx03/__format/formatter_string.h
index 8c766db8c0..024f793687 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<basic_string<_CharT, _Traits, _Allocator>, _CharT> : public __formatter_string<_CharT> {
+struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
+ : public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
template <class _FormatContext>
diff --git a/libcxx/include/__cxx03/__format/formatter_tuple.h b/libcxx/include/__cxx03/__format/formatter_tuple.h
index 0d26c4ccf5..0a5ce4e070 100644
--- a/libcxx/include/__cxx03/__format/formatter_tuple.h
+++ b/libcxx/include/__cxx03/__format/formatter_tuple.h
@@ -136,12 +136,12 @@ private:
};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<pair<_Args...>, _CharT> : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<pair<_Args...>, _CharT>
+ : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<tuple<_Args...>, _CharT> : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<tuple<_Args...>, _CharT>
+ : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
#endif //_LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__cxx03/__functional/binder1st.h b/libcxx/include/__cxx03/__functional/binder1st.h
index 2b00629fa4..21c136ff16 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 _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
-binder1st : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
+ : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
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 6c65c87f48..397215b3d9 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 _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
-binder2nd : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
+ : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
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 9158db6472..862c5037b8 100644
--- a/libcxx/include/__cxx03/__functional/function.h
+++ b/libcxx/include/__cxx03/__functional/function.h
@@ -492,7 +492,7 @@ template <typename _Fun>
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_fun_ref.h b/libcxx/include/__cxx03/__functional/mem_fun_ref.h
index 75c095fe8f..ef962231dc 100644
--- a/libcxx/include/__cxx03/__functional/mem_fun_ref.h
+++ b/libcxx/include/__cxx03/__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/__cxx03/__functional/pointer_to_binary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_binary_function.h
index 603fb44378..72474255d7 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 _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/__cxx03/__functional/pointer_to_unary_function.h b/libcxx/include/__cxx03/__functional/pointer_to_unary_function.h
index 026bece81a..8540ad07f3 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 _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/__cxx03/__functional/unary_negate.h b/libcxx/include/__cxx03/__functional/unary_negate.h
index 73da57aa2e..4d527865f3 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 _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/__cxx03/__iterator/concepts.h b/libcxx/include/__cxx03/__iterator/concepts.h
index 5bb67a7b24..af7d0c9a05 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_reference_t<_Tp>, iter_v
// [iterator.concept.writable]
template <class _Out, class _Tp>
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<const iter_reference_t<_Out> &&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
- const_cast<const iter_reference_t<_Out> &&>(*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<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
+ const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) =
std::forward<_Tp>(__t); // not required to be equality-preserving
};
diff --git a/libcxx/include/__cxx03/__memory/allocator.h b/libcxx/include/__cxx03/__memory/allocator.h
index 9f3d2f4da2..06f270a0c0 100644
--- a/libcxx/include/__cxx03/__memory/allocator.h
+++ b/libcxx/include/__cxx03/__memory/allocator.h
@@ -172,8 +172,8 @@ public:
// TODO(LLVM 20): Remove the escape hatch
#ifdef _LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS
-allocator<const _Tp> : private __non_trivial_if<!is_void<_Tp>::value, allocator<const _Tp> > {
+class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
+ : private __non_trivial_if<!is_void<_Tp>::value, allocator<const _Tp> > {
static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
public:
diff --git a/libcxx/include/__cxx03/__string/char_traits.h b/libcxx/include/__cxx03/__string/char_traits.h
index dd0ce453ab..e962d986b2 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<wchar_t> : __char_traits_base<wchar_t, w
#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char8_t> : __char_traits_base<char8_t, unsigned int, static_cast<unsigned int>(EOF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
+ : __char_traits_base<char8_t, unsigned int, static_cast<unsigned int>(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 @@ char_traits<char8_t> : __char_traits_base<char8_t, unsigned int, static_cast<uns
#endif // _LIBCPP_HAS_NO_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char16_t> : __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(0xFFFF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
+ : __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(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<char16_t>::length(const
}
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char32_t> : __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(0xFFFFFFFF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
+ : __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(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/__tuple/tuple_size.h b/libcxx/include/__cxx03/__tuple/tuple_size.h
index c985969f80..1f8fd22e3e 100644
--- a/libcxx/include/__cxx03/__tuple/tuple_size.h
+++ b/libcxx/include/__cxx03/__tuple/tuple_size.h
@@ -30,17 +30,15 @@ template <class _Tp, class...>
using __enable_if_tuple_size_imp = _Tp;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-tuple_size<__enable_if_tuple_size_imp< const _Tp,
- __enable_if_t<!is_volatile<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< const _Tp,
+ __enable_if_t<!is_volatile<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
- __enable_if_t<!is_const<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
+ __enable_if_t<!is_const<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/common_type.h b/libcxx/include/__cxx03/__type_traits/common_type.h
index 42c8ae5415..78c36162ee 100644
--- a/libcxx/include/__cxx03/__type_traits/common_type.h
+++ b/libcxx/include/__cxx03/__type_traits/common_type.h
@@ -89,8 +89,8 @@ struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
// bullet 4 - sizeof...(Tp) > 2
template <class _Tp, class _Up, class _Vp, class... _Rest>
-struct _LIBCPP_TEMPLATE_VIS
-common_type<_Tp, _Up, _Vp, _Rest...> : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp, _Rest...>
+ : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};
#if _LIBCPP_STD_VER >= 14
template <class... _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/invoke.h b/libcxx/include/__cxx03/__type_traits/invoke.h
index 9e0d03c8ac..47220d6c2e 100644
--- a/libcxx/include/__cxx03/__type_traits/invoke.h
+++ b/libcxx/include/__cxx03/__type_traits/invoke.h
@@ -248,8 +248,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable : integral_constant<bool, __not
};
template <class _Ret, class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-is_nothrow_invocable_r : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r
+ : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
template <class _Fn, class... _Args>
inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value;
diff --git a/libcxx/include/__cxx03/__type_traits/is_arithmetic.h b/libcxx/include/__cxx03/__type_traits/is_arithmetic.h
index d8a13768ee..8d1e019ce4 100644
--- a/libcxx/include/__cxx03/__type_traits/is_arithmetic.h
+++ b/libcxx/include/__cxx03/__type_traits/is_arithmetic.h
@@ -21,8 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_arithmetic : public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};
+struct _LIBCPP_TEMPLATE_VIS is_arithmetic
+ : public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/is_constructible.h b/libcxx/include/__cxx03/__type_traits/is_constructible.h
index 3a41e2db7f..435b0fcefe 100644
--- a/libcxx/include/__cxx03/__type_traits/is_constructible.h
+++ b/libcxx/include/__cxx03/__type_traits/is_constructible.h
@@ -29,8 +29,8 @@ inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_copy_constructible : public integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
+struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
+ : public integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -38,8 +38,8 @@ inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::valu
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_move_constructible : public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
+struct _LIBCPP_TEMPLATE_VIS is_move_constructible
+ : public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/is_literal_type.h b/libcxx/include/__cxx03/__type_traits/is_literal_type.h
index b236cad425..6d0c9a6d6c 100644
--- a/libcxx/include/__cxx03/__type_traits/is_literal_type.h
+++ b/libcxx/include/__cxx03/__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/__cxx03/__type_traits/is_nothrow_constructible.h b/libcxx/include/__cxx03/__type_traits/is_nothrow_constructible.h
index 39bb36f554..b528cc7b49 100644
--- a/libcxx/include/__cxx03/__type_traits/is_nothrow_constructible.h
+++ b/libcxx/include/__cxx03/__type_traits/is_nothrow_constructible.h
@@ -21,8 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template < class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-is_nothrow_constructible : public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
+ : public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class... _Args>
@@ -48,8 +48,8 @@ inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_construc
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_nothrow_default_constructible : public integral_constant<bool, __is_nothrow_constructible(_Tp)> {};
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible
+ : public integral_constant<bool, __is_nothrow_constructible(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/is_nothrow_destructible.h b/libcxx/include/__cxx03/__type_traits/is_nothrow_destructible.h
index 7fbd6d8604..23a28c9bb1 100644
--- a/libcxx/include/__cxx03/__type_traits/is_nothrow_destructible.h
+++ b/libcxx/include/__cxx03/__type_traits/is_nothrow_destructible.h
@@ -39,8 +39,8 @@ struct __libcpp_is_nothrow_destructible<true, _Tp>
: public integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_nothrow_destructible : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
+ : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
template <class _Tp, size_t _Ns>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};
diff --git a/libcxx/include/__cxx03/__type_traits/is_pointer.h b/libcxx/include/__cxx03/__type_traits/is_pointer.h
index 6ca243aa5a..8ce1421921 100644
--- a/libcxx/include/__cxx03/__type_traits/is_pointer.h
+++ b/libcxx/include/__cxx03/__type_traits/is_pointer.h
@@ -50,8 +50,8 @@ template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretai
# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_pointer : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
+struct _LIBCPP_TEMPLATE_VIS is_pointer
+ : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/is_trivially_constructible.h b/libcxx/include/__cxx03/__type_traits/is_trivially_constructible.h
index e49b7ec82a..a47e6d9031 100644
--- a/libcxx/include/__cxx03/__type_traits/is_trivially_constructible.h
+++ b/libcxx/include/__cxx03/__type_traits/is_trivially_constructible.h
@@ -21,8 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-is_trivially_constructible : integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)> {};
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
+ : integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class... _Args>
@@ -48,8 +48,8 @@ inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_cons
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_trivially_default_constructible : public integral_constant<bool, __is_trivially_constructible(_Tp)> {};
+struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible
+ : public integral_constant<bool, __is_trivially_constructible(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__cxx03/__type_traits/is_trivially_destructible.h b/libcxx/include/__cxx03/__type_traits/is_trivially_destructible.h
index 628f81db02..1dbd9e86a0 100644
--- a/libcxx/include/__cxx03/__type_traits/is_trivially_destructible.h
+++ b/libcxx/include/__cxx03/__type_traits/is_trivially_destructible.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_trivially_destructible)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_trivially_destructible : public integral_constant<bool, __is_trivially_destructible(_Tp)> {};
+struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
+ : public integral_constant<bool, __is_trivially_destructible(_Tp)> {};
#elif __has_builtin(__has_trivial_destructor)
diff --git a/libcxx/include/__cxx03/bitset b/libcxx/include/__cxx03/bitset
index 7b0eda6e5d..1507d0cdaf 100644
--- a/libcxx/include/__cxx03/bitset
+++ b/libcxx/include/__cxx03/bitset
@@ -607,8 +607,8 @@ template <size_t _Size>
struct hash<bitset<_Size> >;
template <size_t _Size>
-class _LIBCPP_TEMPLATE_VIS
-bitset : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> {
+class _LIBCPP_TEMPLATE_VIS bitset
+ : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> {
public:
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
typedef __bitset<__n_words, _Size> base;
diff --git a/libcxx/include/__cxx03/codecvt b/libcxx/include/__cxx03/codecvt
index 885574060b..22a4de3790 100644
--- a/libcxx/include/__cxx03/codecvt
+++ b/libcxx/include/__cxx03/codecvt
@@ -433,8 +433,8 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17
-codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
+class _LIBCPP_TEMPLATE_VIS
+_LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf16(size_t __refs = 0)
: __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
diff --git a/libcxx/include/__cxx03/cwchar b/libcxx/include/__cxx03/cwchar
index 0aae4db435..2da11571df 100644
--- a/libcxx/include/__cxx03/cwchar
+++ b/libcxx/include/__cxx03/cwchar
@@ -227,7 +227,7 @@ __constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count)
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
- static_assert(sizeof(_Tp) == sizeof(wchar_t) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
+ static_assert(sizeof(_Tp) == sizeof(wchar_t)&& _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
__libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
"Calling wmemchr on non-trivially equality comparable types is unsafe.");
diff --git a/libcxx/include/__cxx03/istream b/libcxx/include/__cxx03/istream
index f711cda8ce..b1f7b0888d 100644
--- a/libcxx/include/__cxx03/istream
+++ b/libcxx/include/__cxx03/istream
@@ -529,13 +529,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np]) {
template <class _Traits, size_t _Np>
inline _LIBCPP_HIDE_FROM_ABI basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np]) {
- return __is >> (char (&)[_Np])__buf;
+ return __is >> (char(&)[_Np])__buf;
}
template <class _Traits, size_t _Np>
inline _LIBCPP_HIDE_FROM_ABI basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np]) {
- return __is >> (char (&)[_Np])__buf;
+ return __is >> (char(&)[_Np])__buf;
}
#else
diff --git a/libcxx/include/__cxx03/queue b/libcxx/include/__cxx03/queue
index f012a7092d..d470bc180a 100644
--- a/libcxx/include/__cxx03/queue
+++ b/libcxx/include/__cxx03/queue
@@ -937,8 +937,8 @@ swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Contai
}
template <class _Tp, class _Container, class _Compare, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS
-uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc> : public uses_allocator<_Container, _Alloc> {};
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
+ : public uses_allocator<_Container, _Alloc> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__cxx03/regex b/libcxx/include/__cxx03/regex
index 28dd694bcd..ea9512cd56 100644
--- a/libcxx/include/__cxx03/regex
+++ b/libcxx/include/__cxx03/regex
@@ -2267,8 +2267,8 @@ typedef basic_regex<wchar_t> wregex;
#endif
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(regex) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex))
- basic_regex {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(regex)
+ _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex)) basic_regex {
public:
// types:
typedef _CharT value_type;
diff --git a/libcxx/include/__cxx03/shared_mutex b/libcxx/include/__cxx03/shared_mutex
index 53c7004a31..7acecdafc3 100644
--- a/libcxx/include/__cxx03/shared_mutex
+++ b/libcxx/include/__cxx03/shared_mutex
@@ -218,8 +218,8 @@ public:
};
# endif
-class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_timed_mutex"))
-shared_timed_mutex {
+class _LIBCPP_EXPORTED_FROM_ABI
+_LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_timed_mutex")) shared_timed_mutex {
__shared_mutex_base __base_;
public:
diff --git a/libcxx/include/__cxx03/tuple b/libcxx/include/__cxx03/tuple
index 248bc07708..3579fd7981 100644
--- a/libcxx/include/__cxx03/tuple
+++ b/libcxx/include/__cxx03/tuple
@@ -455,8 +455,8 @@ template <class _Indx, class... _Tp>
struct __tuple_impl;
template <size_t... _Indx, class... _Tp>
-struct _LIBCPP_DECLSPEC_EMPTY_BASES
- __tuple_impl<__tuple_indices<_Indx...>, _Tp...> : public __tuple_leaf<_Indx, _Tp>... {
+struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
+ : public __tuple_leaf<_Indx, _Tp>... {
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_impl() noexcept(
__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
diff --git a/libcxx/include/__cxx03/variant b/libcxx/include/__cxx03/variant
index 924b83203c..f2fee556a5 100644
--- a/libcxx/include/__cxx03/variant
+++ b/libcxx/include/__cxx03/variant
@@ -759,8 +759,8 @@ class _LIBCPP_TEMPLATE_VIS __dtor;
# define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor_definition, destroy) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __dtor<__traits<_Types...>, destructible_trait> : public __base<destructible_trait, _Types...> { \
+ class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, destructible_trait> \
+ : public __base<destructible_trait, _Types...> { \
using __base_type = __base<destructible_trait, _Types...>; \
using __index_t = typename __base_type::__index_t; \
\
@@ -837,8 +837,8 @@ class _LIBCPP_TEMPLATE_VIS __move_constructor;
# define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, move_constructor_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __move_constructor<__traits<_Types...>, move_constructible_trait> : public __ctor<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, move_constructible_trait> \
+ : public __ctor<__traits<_Types...>> { \
using __base_type = __ctor<__traits<_Types...>>; \
\
public: \
@@ -964,8 +964,8 @@ class _LIBCPP_TEMPLATE_VIS __move_assignment;
# define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, move_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __move_assignment<__traits<_Types...>, move_assignable_trait> : public __assignment<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, move_assignable_trait> \
+ : public __assignment<__traits<_Types...>> { \
using __base_type = __assignment<__traits<_Types...>>; \
\
public: \
@@ -1003,8 +1003,8 @@ class _LIBCPP_TEMPLATE_VIS __copy_assignment;
# define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, copy_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __copy_assignment<__traits<_Types...>, copy_assignable_trait> : public __move_assignment<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, copy_assignable_trait> \
+ : public __move_assignment<__traits<_Types...>> { \
using __base_type = __move_assignment<__traits<_Types...>>; \
\
public: \
diff --git a/libcxx/include/__cxx03/vector b/libcxx/include/__cxx03/vector
index a92dcfcbb8..6ee35b4e36 100644
--- a/libcxx/include/__cxx03/vector
+++ b/libcxx/include/__cxx03/vector
@@ -2894,8 +2894,8 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t vector<bool, _Allocator>::__hash_code() con
}
template <class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS
-hash<vector<bool, _Allocator> > : public __unary_function<vector<bool, _Allocator>, size_t> {
+struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
+ : public __unary_function<vector<bool, _Allocator>, size_t> {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT {
return __vec.__hash_code();
diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h
index 260945171a..48d42ee7d9 100644
--- a/libcxx/include/__format/container_adaptor.h
+++ b/libcxx/include/__format/container_adaptor.h
@@ -55,16 +55,16 @@ public:
};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<queue<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<queue<_Tp, _Container>, _CharT>
+ : public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
template <class _CharT, class _Tp, class _Container, class _Compare>
struct _LIBCPP_TEMPLATE_VIS formatter<priority_queue<_Tp, _Container, _Compare>, _CharT>
: public __formatter_container_adaptor<priority_queue<_Tp, _Container, _Compare>, _CharT> {};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<stack<_Tp, _Container>, _CharT> : public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<stack<_Tp, _Container>, _CharT>
+ : public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 7507d2de5e..112c731e67 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -100,8 +100,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<basic_string<_CharT, _Traits, _Allocator>, _CharT> : public __formatter_string<_CharT> {
+struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
+ : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
diff --git a/libcxx/include/__format/formatter_tuple.h b/libcxx/include/__format/formatter_tuple.h
index 4d616aab77..bb841ef114 100644
--- a/libcxx/include/__format/formatter_tuple.h
+++ b/libcxx/include/__format/formatter_tuple.h
@@ -136,12 +136,12 @@ private:
};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<pair<_Args...>, _CharT> : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<pair<_Args...>, _CharT>
+ : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS
-formatter<tuple<_Args...>, _CharT> : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
+struct _LIBCPP_TEMPLATE_VIS formatter<tuple<_Args...>, _CharT>
+ : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__functional/binder1st.h b/libcxx/include/__functional/binder1st.h
index c3b153383d..04b51fefab 100644
--- a/libcxx/include/__functional/binder1st.h
+++ b/libcxx/include/__functional/binder1st.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
-binder1st : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
+ : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
typename _Operation::first_argument_type value;
diff --git a/libcxx/include/__functional/binder2nd.h b/libcxx/include/__functional/binder2nd.h
index 50ba0f2815..9d22e4430b 100644
--- a/libcxx/include/__functional/binder2nd.h
+++ b/libcxx/include/__functional/binder2nd.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11
-binder2nd : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
+ : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
typename _Operation::second_argument_type value;
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index c39a074423..3e25129143 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -498,7 +498,7 @@ template <typename _Fun>
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/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h
index 50b531b0a8..c344420b02 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/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h
index 24e26fb3a5..e345250dcd 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 71f0d989fc..3a5d153d36 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 2c551f54d9..5bd487a97b 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/concepts.h b/libcxx/include/__iterator/concepts.h
index 4802d5ffbc..6e5ac1d3af 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -97,10 +97,10 @@ using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, __indi
// [iterator.concept.writable]
template <class _Out, class _Tp>
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<const iter_reference_t<_Out> &&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
- const_cast<const iter_reference_t<_Out> &&>(*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<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
+ const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) =
std::forward<_Tp>(__t); // not required to be equality-preserving
};
diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index 27594d1ae9..9574cde642 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -260,8 +260,8 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, w
#if _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char8_t> : __char_traits_base<char8_t, unsigned int, static_cast<unsigned int>(EOF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
+ : __char_traits_base<char8_t, unsigned int, static_cast<unsigned int>(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));
@@ -280,8 +280,8 @@ char_traits<char8_t> : __char_traits_base<char8_t, unsigned int, static_cast<uns
#endif // _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char16_t> : __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(0xFFFF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
+ : __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(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;
@@ -315,8 +315,8 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char16_t>::length(const
}
template <>
-struct _LIBCPP_TEMPLATE_VIS
-char_traits<char32_t> : __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(0xFFFFFFFF)> {
+struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
+ : __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(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/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h
index 5f4d840c0f..27d57eb56b 100644
--- a/libcxx/include/__tuple/tuple_size.h
+++ b/libcxx/include/__tuple/tuple_size.h
@@ -32,17 +32,15 @@ template <class _Tp, class...>
using __enable_if_tuple_size_imp _LIBCPP_NODEBUG = _Tp;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-tuple_size<__enable_if_tuple_size_imp< const _Tp,
- __enable_if_t<!is_volatile<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< const _Tp,
+ __enable_if_t<!is_volatile<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
- __enable_if_t<!is_const<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
+ __enable_if_t<!is_const<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h
index d01afd53ea..e4c6b495c3 100644
--- a/libcxx/include/__type_traits/common_type.h
+++ b/libcxx/include/__type_traits/common_type.h
@@ -103,8 +103,8 @@ struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
// bullet 4 - sizeof...(Tp) > 2
template <class _Tp, class _Up, class _Vp, class... _Rest>
-struct _LIBCPP_TEMPLATE_VIS
-common_type<_Tp, _Up, _Vp, _Rest...> : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp, _Rest...>
+ : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};
#endif
diff --git a/libcxx/include/__type_traits/enable_if.h b/libcxx/include/__type_traits/enable_if.h
index 155a0dc0e5..b572092542 100644
--- a/libcxx/include/__type_traits/enable_if.h
+++ b/libcxx/include/__type_traits/enable_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool, class _Tp = void>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS enable_if {};
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS enable_if{};
_LIBCPP_DIAGNOSTIC_PUSH
#if __has_warning("-Winvalid-specialization")
diff --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h
index ca3260acc5..a363ad6b4a 100644
--- a/libcxx/include/__type_traits/is_nothrow_destructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_destructible.h
@@ -40,8 +40,8 @@ struct __libcpp_is_nothrow_destructible<true, _Tp>
: public integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_nothrow_destructible : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
+ : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
template <class _Tp, size_t _Ns>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};
diff --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h
index 76115f910e..5647bf4045 100644
--- a/libcxx/include/__type_traits/is_pointer.h
+++ b/libcxx/include/__type_traits/is_pointer.h
@@ -50,8 +50,8 @@ template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretai
# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
-is_pointer : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
+struct _LIBCPP_TEMPLATE_VIS is_pointer
+ : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__vector/vector_bool.h b/libcxx/include/__vector/vector_bool.h
index 85b9ba7748..569cc5ea89 100644
--- a/libcxx/include/__vector/vector_bool.h
+++ b/libcxx/include/__vector/vector_bool.h
@@ -1109,8 +1109,8 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t vector<bool, _Allocator>::__hash_code() con
}
template <class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS
-hash<vector<bool, _Allocator> > : public __unary_function<vector<bool, _Allocator>, size_t> {
+struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
+ : public __unary_function<vector<bool, _Allocator>, size_t> {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT {
return __vec.__hash_code();
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index 5d7bc00760..669a3947a8 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -606,8 +606,8 @@ template <size_t _Size>
struct hash<bitset<_Size> >;
template <size_t _Size>
-class _LIBCPP_TEMPLATE_VIS
-bitset : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> {
+class _LIBCPP_TEMPLATE_VIS bitset
+ : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> {
public:
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
typedef __bitset<__n_words, _Size> __base;
diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt
index cb16f52f43..0526b85121 100644
--- a/libcxx/include/codecvt
+++ b/libcxx/include/codecvt
@@ -439,8 +439,8 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17
-codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
+class _LIBCPP_TEMPLATE_VIS
+_LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf16(size_t __refs = 0)
: __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
diff --git a/libcxx/include/cwchar b/libcxx/include/cwchar
index dc96eebd98..8b940b887d 100644
--- a/libcxx/include/cwchar
+++ b/libcxx/include/cwchar
@@ -231,7 +231,7 @@ __constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count)
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
- static_assert(sizeof(_Tp) == sizeof(wchar_t) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
+ static_assert(sizeof(_Tp) == sizeof(wchar_t)&& _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
__libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
"Calling wmemchr on non-trivially equality comparable types is unsafe.");
diff --git a/libcxx/include/istream b/libcxx/include/istream
index ad12c1bdd4..4b177c41cc 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -536,13 +536,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np]) {
template <class _Traits, size_t _Np>
inline _LIBCPP_HIDE_FROM_ABI basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np]) {
- return __is >> (char (&)[_Np])__buf;
+ return __is >> (char(&)[_Np])__buf;
}
template <class _Traits, size_t _Np>
inline _LIBCPP_HIDE_FROM_ABI basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np]) {
- return __is >> (char (&)[_Np])__buf;
+ return __is >> (char(&)[_Np])__buf;
}
# else
diff --git a/libcxx/include/queue b/libcxx/include/queue
index 086db1a042..890586ce37 100644
--- a/libcxx/include/queue
+++ b/libcxx/include/queue
@@ -940,8 +940,8 @@ swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Contai
}
template <class _Tp, class _Container, class _Compare, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS
-uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc> : public uses_allocator<_Container, _Alloc> {};
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
+ : public uses_allocator<_Container, _Alloc> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 0d06c1636b..02ba66abd1 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -2273,8 +2273,8 @@ typedef basic_regex<wchar_t> wregex;
# endif
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(regex) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex))
- basic_regex {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(regex)
+ _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex)) basic_regex {
public:
// types:
typedef _CharT value_type;
diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index 9f5a955662..b1e2a5d434 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -221,8 +221,8 @@ public:
};
# endif
-class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_timed_mutex"))
-shared_timed_mutex {
+class _LIBCPP_EXPORTED_FROM_ABI
+_LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_timed_mutex")) shared_timed_mutex {
__shared_mutex_base __base_;
public:
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 455f2fe684..1e0703421d 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -462,8 +462,8 @@ template <class _Indx, class... _Tp>
struct __tuple_impl;
template <size_t... _Indx, class... _Tp>
-struct _LIBCPP_DECLSPEC_EMPTY_BASES
- __tuple_impl<__tuple_indices<_Indx...>, _Tp...> : public __tuple_leaf<_Indx, _Tp>... {
+struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
+ : public __tuple_leaf<_Indx, _Tp>... {
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_impl() noexcept(
__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 199766c93c..54044dde6b 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -752,8 +752,8 @@ class _LIBCPP_TEMPLATE_VIS __dtor;
# define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor_definition, destroy) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __dtor<__traits<_Types...>, destructible_trait> : public __base<destructible_trait, _Types...> { \
+ class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, destructible_trait> \
+ : public __base<destructible_trait, _Types...> { \
using __base_type _LIBCPP_NODEBUG = __base<destructible_trait, _Types...>; \
using __index_t _LIBCPP_NODEBUG = typename __base_type::__index_t; \
\
@@ -830,8 +830,8 @@ class _LIBCPP_TEMPLATE_VIS __move_constructor;
# define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, move_constructor_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __move_constructor<__traits<_Types...>, move_constructible_trait> : public __ctor<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, move_constructible_trait> \
+ : public __ctor<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __ctor<__traits<_Types...>>; \
\
public: \
@@ -957,8 +957,8 @@ class _LIBCPP_TEMPLATE_VIS __move_assignment;
# define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, move_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __move_assignment<__traits<_Types...>, move_assignable_trait> : public __assignment<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, move_assignable_trait> \
+ : public __assignment<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __assignment<__traits<_Types...>>; \
\
public: \
@@ -996,8 +996,8 @@ class _LIBCPP_TEMPLATE_VIS __copy_assignment;
# define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, copy_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS \
- __copy_assignment<__traits<_Types...>, copy_assignable_trait> : public __move_assignment<__traits<_Types...>> { \
+ class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, copy_assignable_trait> \
+ : public __move_assignment<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __move_assignment<__traits<_Types...>>; \
\
public: \
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for doing this!
Can you specify the exact version of clang-format you used?
I also noticed the CI does complain about your formatting, so I wonder whether the CI uses the same version.
I've reviewed the changes and I don't see bad formatting, so LGTM!
|
I'm confused, it seems that my local clang-format is actually out of date. I'll abandon this. |
|
Also, please don't format the C++03 headers. I've got a few local patches and it would be absolute hell to rebase them. |
This is a small re-adjustment of libcxx/include with the current version of clang-format we use in the CI.