[libcxx-commits] [libcxx] de6827b - [libc++] Improves clang-format settings.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 27 10:24:11 PST 2023


Author: Mark de Wever
Date: 2023-02-27T19:24:06+01:00
New Revision: de6827b530d8b6fd85e6714af80eca3107c91ea2

URL: https://github.com/llvm/llvm-project/commit/de6827b530d8b6fd85e6714af80eca3107c91ea2
DIFF: https://github.com/llvm/llvm-project/commit/de6827b530d8b6fd85e6714af80eca3107c91ea2.diff

LOG: [libc++] Improves clang-format settings.

Add a new test based .clang-format file which inherits from the generic
one. This moves some test specific formatting rules to the test
directory.

The main benefit is that headers are sorted, which makes it more likely
to catch these errors before creating a review instead of spotting the
error in the CI clang-tidy step.

Reviewed By: ldionne, philnik, #libc

Differential Revision: https://reviews.llvm.org/D144755

Added: 
    libcxx/test/.clang-format

Modified: 
    libcxx/.clang-format
    libcxx/include/__chrono/convert_to_tm.h
    libcxx/include/__chrono/ostream.h
    libcxx/include/algorithm
    libcxx/include/functional
    libcxx/include/utility

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-format b/libcxx/.clang-format
index 77ffa23435cc0..68180bbef4c87 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -77,10 +77,6 @@ AlwaysBreakTemplateDeclarations: true
 PointerAlignment: Left
 
 
-# Disable formatting options which may break tests.
-SortIncludes: false
-ReflowComments: false
-
 # libc++'s preferred indentions of preprocessor statements.
 IndentPPDirectives: AfterHash
 

diff  --git a/libcxx/include/__chrono/convert_to_tm.h b/libcxx/include/__chrono/convert_to_tm.h
index 5b71fc7bc7298..951852fa98c61 100644
--- a/libcxx/include/__chrono/convert_to_tm.h
+++ b/libcxx/include/__chrono/convert_to_tm.h
@@ -136,7 +136,7 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoT& __value) {
   return __result;
 }
 
-#endif //if _LIBCPP_STD_VER >= 20
+#endif // if _LIBCPP_STD_VER >= 20
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__chrono/ostream.h b/libcxx/include/__chrono/ostream.h
index 74d7e8544c955..23feb9d711303 100644
--- a/libcxx/include/__chrono/ostream.h
+++ b/libcxx/include/__chrono/ostream.h
@@ -106,15 +106,14 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const duration<_Rep, _Period>&
 template <class _CharT, class _Traits>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const day& __d) {
-  return __os
-      << (__d.ok()
-              ? std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:%d}"), __d)
-              // Note this error 
diff ers from the wording of the Standard. The
-              // Standard wording doesn't work well on AIX or Windows. There
-              // the formatted day seems to be either modulo 100 or completely
-              // omitted. Judging by the wording this is valid.
-              // TODO FMT Write a paper of file an LWG issue.
-              : std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:02} is not a valid day"), static_cast<unsigned>(__d)));
+  return __os << (__d.ok() ? std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:%d}"), __d)
+                           // Note this error 
diff ers from the wording of the Standard. The
+                           // Standard wording doesn't work well on AIX or Windows. There
+                           // the formatted day seems to be either modulo 100 or completely
+                           // omitted. Judging by the wording this is valid.
+                           // TODO FMT Write a paper of file an LWG issue.
+                           : std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:02} is not a valid day"),
+                                         static_cast<unsigned>(__d)));
 }
 
 template <class _CharT, class _Traits>
@@ -238,7 +237,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const hh_mm_ss<_Duration> __hms
 
 } // namespace chrono
 
-#endif //if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+#endif // if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 21d177cbb66fd..75ba4b240dc00 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -22,41 +22,41 @@ namespace ranges {
 
   // [algorithms.results], algorithm result types
   template <class I, class F>
-    struct in_fun_result;     // since C++20
+    struct in_fun_result;                // since C++20
 
   template <class I1, class I2>
-    struct in_in_result;      // since C++20
+    struct in_in_result;                 // since C++20
 
   template <class I, class O>
-    struct in_out_result;  // since C++20
+    struct in_out_result;                // since C++20
 
   template <class I1, class I2, class O>
-    struct in_in_out_result;  // since C++20
+    struct in_in_out_result;             // since C++20
 
   template <class I, class O1, class O2>
-    struct in_out_out_result; // since C++20
+    struct in_out_out_result;            // since C++20
 
   template <class I1, class I2>
-    struct min_max_result;    // since C++20
+    struct min_max_result;               // since C++20
 
   template <class I>
-    struct in_found_result;   // since C++20
+    struct in_found_result;              // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
-    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>             // since C++20
+    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>                                   // since C++20
   constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {});
 
   template<forward_range R, class Proj = identity,
-    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20
+    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>                       // since C++20
   constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {});
 
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
     indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
-  constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {});                        // since C++20
+  constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {});                       // since C++20
 
   template<forward_range R, class Proj = identity,
     indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
-  constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {});             // since C++20
+  constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {});            // since C++20
 
   template<class I1, class I2>
     using mismatch_result = in_in_result<I1, I2>;
@@ -64,86 +64,86 @@ namespace ranges {
   template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
     requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
-  constexpr mismatch_result<_I1, _I2>
-  mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20
+  constexpr mismatch_result<_I1, _I2>                                                                     // since C++20
+  mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})
 
   template <input_range R1, input_range R2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
     requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
   constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
-  mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})                           // since C++20
+  mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})                          // since C++20
 
     requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
-    constexpr I find(I first, S last, const T& value, Proj proj = {});              // since C++20
+    constexpr I find(I first, S last, const T& value, Proj proj = {});                                    // since C++20
 
   template<input_range R, class T, class Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
     constexpr borrowed_iterator_t<R>
-      find(R&& r, const T& value, Proj proj = {});                                  // since C++20
+      find(R&& r, const T& value, Proj proj = {});                                                        // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr I find_if(I first, S last, Pred pred, Proj proj = {});                // since C++20
+    constexpr I find_if(I first, S last, Pred pred, Proj proj = {});                                      // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     constexpr borrowed_iterator_t<R>
-      find_if(R&& r, Pred pred, Proj proj = {});                                    // since C++20
+      find_if(R&& r, Pred pred, Proj proj = {});                                                          // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {});            // since C++20
+    constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {});                                  // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     constexpr borrowed_iterator_t<R>
-      find_if_not(R&& r, Pred pred, Proj proj = {});                                // since C++20
+      find_if_not(R&& r, Pred pred, Proj proj = {});                                                      // since C++20
 
   template<class T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
-    constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20
+    constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20
 
   template<copyable T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
-    constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {});         // since C++20
+    constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20
 
  template<input_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
    constexpr range_value_t<R>
-     min(R&& r, Comp comp = {}, Proj proj = {});                                    // since C++20
+     min(R&& r, Comp comp = {}, Proj proj = {});                                                          // since C++20
 
   template<class T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
-    constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20
+    constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20
 
   template<copyable T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
-    constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {});         // since C++20
+    constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
     requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
     constexpr range_value_t<R>
-      max(R&& r, Comp comp = {}, Proj proj = {});                                   // since C++20
+      max(R&& r, Comp comp = {}, Proj proj = {});                                                         // since C++20
 
   template<class I, class O>
-    using unary_transform_result = in_out_result<I, O>;                             // since C++20
+    using unary_transform_result = in_out_result<I, O>;                                                   // since C++20
 
   template<class I1, class I2, class O>
-    using binary_transform_result = in_in_out_result<I1, I2, O>;                    // since C++20
+    using binary_transform_result = in_in_out_result<I1, I2, O>;                                          // since C++20
 
   template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,
            copy_constructible F, class Proj = identity>
     requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>>
     constexpr ranges::unary_transform_result<I, O>
-      transform(I first1, S last1, O result, F op, Proj proj = {});                 // since C++20
+      transform(I first1, S last1, O result, F op, Proj proj = {});                                       // since C++20
 
   template<input_range R, weakly_incrementable O, copy_constructible F,
            class Proj = identity>
     requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>>
     constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O>
-      transform(R&& r, O result, F op, Proj proj = {});                             // since C++20
+      transform(R&& r, O result, F op, Proj proj = {});                                                   // since C++20
 
   template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
            weakly_incrementable O, copy_constructible F, class Proj1 = identity,
@@ -152,7 +152,7 @@ namespace ranges {
                                            projected<I2, Proj2>>>
     constexpr ranges::binary_transform_result<I1, I2, O>
       transform(I1 first1, S1 last1, I2 first2, S2 last2, O result,
-                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});           // since C++20
+                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20
 
   template<input_range R1, input_range R2, weakly_incrementable O,
            copy_constructible F, class Proj1 = identity, class Proj2 = identity>
@@ -160,27 +160,27 @@ namespace ranges {
                                            projected<iterator_t<R2>, Proj2>>>
     constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
       transform(R1&& r1, R2&& r2, O result,
-                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});           // since C++20
+                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
     constexpr iter_
diff erence_t<I>
-      count(I first, S last, const T& value, Proj proj = {});                       // since C++20
+      count(I first, S last, const T& value, Proj proj = {});                                             // since C++20
 
   template<input_range R, class T, class Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
     constexpr range_
diff erence_t<R>
-      count(R&& r, const T& value, Proj proj = {});                                 // since C++20
+      count(R&& r, const T& value, Proj proj = {});                                                       // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
     constexpr iter_
diff erence_t<I>
-      count_if(I first, S last, Pred pred, Proj proj = {});                         // since C++20
+      count_if(I first, S last, Pred pred, Proj proj = {});                                               // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     constexpr range_
diff erence_t<R>
-      count_if(R&& r, Pred pred, Proj proj = {});                                   // since C++20
+      count_if(R&& r, Pred pred, Proj proj = {});                                                         // since C++20
 
   template<class T>
   using minmax_result = min_max_result<T>;
@@ -188,18 +188,18 @@ namespace ranges {
   template<class T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
     constexpr ranges::minmax_result<const T&>
-      minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {});                     // since C++20
+      minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {});                                     // since C++20
 
   template<copyable T, class Proj = identity,
            indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
     constexpr ranges::minmax_result<T>
-      minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {});                      // since C++20
+      minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {});                                      // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
     requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
     constexpr ranges::minmax_result<range_value_t<R>>
-      minmax(R&& r, Comp comp = {}, Proj proj = {});                                      // since C++20
+      minmax(R&& r, Comp comp = {}, Proj proj = {});                                                      // since C++20
 
   template<class I>
   using minmax_element_result = min_max_result<I>;
@@ -207,18 +207,18 @@ namespace ranges {
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
     constexpr ranges::minmax_element_result<I>
-      minmax_element(I first, S last, Comp comp = {}, Proj proj = {});                    // since C++20
+      minmax_element(I first, S last, Comp comp = {}, Proj proj = {});                                    // since C++20
 
   template<forward_range R, class Proj = identity,
            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
     constexpr ranges::minmax_element_result<borrowed_iterator_t<R>>
-      minmax_element(R&& r, Comp comp = {}, Proj proj = {});                              // since C++20
+      minmax_element(R&& r, Comp comp = {}, Proj proj = {});                                              // since C++20
 
   template<class I, class O>
-    using copy_result = in_out_result<I, O>;                                              // since C++20
+    using copy_result = in_out_result<I, O>;                                                // since C++20
 
   template<class I, class O>
-    using copy_n_result = in_out_result<I, O>;                                            // since C++20
+    using copy_n_result = in_out_result<I, O>;                                              // since C++20
 
   template<class I, class O>
     using copy_if_result = in_out_result<I, O>;                                             // since C++20
@@ -333,20 +333,20 @@ namespace ranges {
 
   template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,
             indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
-    constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {});                // Since C++20
+    constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {});                // since C++20
 
   template<random_access_range R, class Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
-    constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {});                          // Since C++20
+    constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {});                          // since C++20
 
   template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
-    constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {});             // Since C++20
+    constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {});             // since C++20
 
   template<random_access_range R, class Proj = identity,
            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
     constexpr borrowed_iterator_t<R>
-      is_heap_until(R&& r, Comp comp = {}, Proj proj = {});                                 // Since C++20
+      is_heap_until(R&& r, Comp comp = {}, Proj proj = {});                                 // since C++20
 
   template<bidirectional_iterator I, sentinel_for<I> S>
     requires permutable<I>
@@ -399,15 +399,15 @@ namespace ranges {
 
   template<input_or_output_iterator O, sentinel_for<O> S, copy_constructible F>
     requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
-    constexpr O generate(O first, S last, F gen);                                           // Since C++20
+    constexpr O generate(O first, S last, F gen);                                           // since C++20
 
   template<class R, copy_constructible F>
     requires invocable<F&> && output_range<R, invoke_result_t<F&>>
-    constexpr borrowed_iterator_t<R> generate(R&& r, F gen);                                // Since C++20
+    constexpr borrowed_iterator_t<R> generate(R&& r, F gen);                                // since C++20
 
   template<input_or_output_iterator O, copy_constructible F>
     requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
-    constexpr O generate_n(O first, iter_
diff erence_t<O> n, F gen);                         // Since C++20
+    constexpr O generate_n(O first, iter_
diff erence_t<O> n, F gen);                         // since C++20
 
  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
@@ -424,27 +424,27 @@ namespace ranges {
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {});      // since C++20
+    constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {});              // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
-    constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {});                // since C++20
+    constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {});                        // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {});      // since C++20
+    constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {});              // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
-    constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {});                // since C++20
+    constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {});                        // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {});     // since C++20
+    constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {});             // since C++20
 
   template<input_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
-    constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {});               // since C++20
+    constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {});                       // since C++20
 
   template<input_iterator I1, sentinel_for<I1> S1,
           random_access_iterator I2, sentinel_for<I2> S2,
@@ -453,7 +453,7 @@ namespace ranges {
             indirect_strict_weak_order<Comp, projected<I1, Proj1>, projected<I2, Proj2>>
     constexpr partial_sort_copy_result<I1, I2>
       partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last,
-                        Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});        // Since C++20
+                        Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++20
 
   template<input_range R1, random_access_range R2, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
@@ -463,7 +463,7 @@ namespace ranges {
                                         projected<iterator_t<R2>, Proj2>>
     constexpr partial_sort_copy_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
       partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {},
-                        Proj1 proj1 = {}, Proj2 proj2 = {});                        // Since C++20
+                        Proj1 proj1 = {}, Proj2 proj2 = {});                                // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
@@ -486,64 +486,64 @@ namespace ranges {
           class Proj = identity>
     requires sortable<I, Comp, Proj>
     constexpr I
-      ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {});            // since C++20
+      ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {});          // since C++20
 
   template<random_access_range R, class Comp = ranges::less, class Proj = identity>
     requires sortable<iterator_t<R>, Comp, Proj>
     constexpr borrowed_iterator_t<R>
-      ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {});          // since C++20
+      ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {});        // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
-           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
-    constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); // since C++20
+           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>    // since C++20
+    constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {});
 
   template<forward_range R, class T, class Proj = identity,
            indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
              ranges::less>
     constexpr borrowed_iterator_t<R>
-      upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                     // since C++20
+      upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
            indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
     constexpr I lower_bound(I first, S last, const T& value, Comp comp = {},
-                                    Proj proj = {});                                          // since C++20
+                                    Proj proj = {});                                        // since C++20
   template<forward_range R, class T, class Proj = identity,
            indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
              ranges::less>
     constexpr borrowed_iterator_t<R>
-      lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                     // since C++20
+      lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
            indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
     constexpr bool binary_search(I first, S last, const T& value, Comp comp = {},
-                                         Proj proj = {});                                     // since C++20
+                                         Proj proj = {});                                   // since C++20
 
   template<forward_range R, class T, class Proj = identity,
            indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
              ranges::less>
     constexpr bool binary_search(R&& r, const T& value, Comp comp = {},
-                                         Proj proj = {});                                     // since C++20
+                                         Proj proj = {});                                   // since C++20
 
   template<permutable I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
     constexpr subrange<I>
-      partition(I first, S last, Pred pred, Proj proj = {});                                  // Since C++20
+      partition(I first, S last, Pred pred, Proj proj = {});                                // since C++20
 
   template<forward_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     requires permutable<iterator_t<R>>
     constexpr borrowed_subrange_t<R>
-      partition(R&& r, Pred pred, Proj proj = {});                                            // Since C++20
+      partition(R&& r, Pred pred, Proj proj = {});                                          // since C++20
 
   template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
     requires permutable<I>
-    subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {});                 // Since C++20
+    subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {});               // since C++20
 
   template<bidirectional_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     requires permutable<iterator_t<R>>
-    borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {});                // Since C++20
+    borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {});              // since C++20
 
   template<input_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
            class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
@@ -563,7 +563,7 @@ namespace ranges {
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_binary_predicate<projected<I, Proj>,
                                      projected<I, Proj>> Pred = ranges::equal_to>
-    constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});     // since C+20
+    constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});     // since C++20
 
   template<forward_range R, class Proj = identity,
            indirect_binary_predicate<projected<iterator_t<R>, Proj>,
@@ -604,7 +604,7 @@ namespace ranges {
                                       projected<I2, Proj2>> Comp = ranges::less>
     constexpr bool
       ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2,
-                                      Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});    // since C++20
+                                      Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});          // since C++20
 
   template<input_range R1, input_range R2, class Proj1 = identity,
            class Proj2 = identity,
@@ -612,7 +612,7 @@ namespace ranges {
                                       projected<iterator_t<R2>, Proj2>> Comp = ranges::less>
     constexpr bool
       ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {},
-                                      Proj1 proj1 = {}, Proj2 proj2 = {});                    // since C++20
+                                      Proj1 proj1 = {}, Proj2 proj2 = {});                          // since C++20
 
   template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
     requires indirectly_movable<I1, I2>
@@ -643,7 +643,7 @@ namespace ranges {
     requires indirectly_copyable<I, O1> && indirectly_copyable<I, O2>
     constexpr partition_copy_result<I, O1, O2>
       partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred,
-                    Proj proj = {});                                                                // Since C++20
+                    Proj proj = {});                                                                // since C++20
 
   template<input_range R, weakly_incrementable O1, weakly_incrementable O2,
           class Proj = identity,
@@ -651,16 +651,16 @@ namespace ranges {
     requires indirectly_copyable<iterator_t<R>, O1> &&
             indirectly_copyable<iterator_t<R>, O2>
     constexpr partition_copy_result<borrowed_iterator_t<R>, O1, O2>
-      partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {});                  // Since C++20
+      partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {});                  // since C++20
 
   template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_unary_predicate<projected<I, Proj>> Pred>
-    constexpr I partition_point(I first, S last, Pred pred, Proj proj = {});                        // Since C++20
+    constexpr I partition_point(I first, S last, Pred pred, Proj proj = {});                        // since C++20
 
   template<forward_range R, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     constexpr borrowed_iterator_t<R>
-      partition_point(R&& r, Pred pred, Proj proj = {});                                            // Since C++20
+      partition_point(R&& r, Pred pred, Proj proj = {});                                            // since C++20
 
   template<class I1, class I2, class O>
     using merge_result = in_in_out_result<I1, I2, O>;                                               // since C++20
@@ -755,7 +755,7 @@ namespace ranges {
 
   template<forward_range R>
     requires permutable<iterator_t<R>>
-    constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle);                           // Since C++20
+    constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle);                           // since C++20
 
   template <class _InIter, class _OutIter>
   using rotate_copy_result = in_out_result<_InIter, _OutIter>;                                      // since C++20
@@ -774,23 +774,23 @@ namespace ranges {
     requires (forward_iterator<I> || random_access_iterator<O>) &&
             indirectly_copyable<I, O> &&
             uniform_random_bit_generator<remove_reference_t<Gen>>
-    O sample(I first, S last, O out, iter_
diff erence_t<I> n, Gen&& g);                              // Since C++20
+    O sample(I first, S last, O out, iter_
diff erence_t<I> n, Gen&& g);                              // since C++20
 
   template<input_range R, weakly_incrementable O, class Gen>
     requires (forward_range<R> || random_access_iterator<O>) &&
             indirectly_copyable<iterator_t<R>, O> &&
             uniform_random_bit_generator<remove_reference_t<Gen>>
-    O sample(R&& r, O out, range_
diff erence_t<R> n, Gen&& g);                                       // Since C++20
+    O sample(R&& r, O out, range_
diff erence_t<R> n, Gen&& g);                                       // since C++20
 
   template<random_access_iterator I, sentinel_for<I> S, class Gen>
     requires permutable<I> &&
             uniform_random_bit_generator<remove_reference_t<Gen>>
-    I shuffle(I first, S last, Gen&& g);                                                           // Since C++20
+    I shuffle(I first, S last, Gen&& g);                                                            // since C++20
 
   template<random_access_range R, class Gen>
     requires permutable<iterator_t<R>> &&
             uniform_random_bit_generator<remove_reference_t<Gen>>
-    borrowed_iterator_t<R> shuffle(R&& r, Gen&& g);                                                // Since C++20
+    borrowed_iterator_t<R> shuffle(R&& r, Gen&& g);                                                 // since C++20
 
   template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,
          sentinel_for<I2> S2, class Proj1 = identity, class Proj2 = identity,
@@ -798,14 +798,14 @@ namespace ranges {
                                        projected<I2, Proj2>> Pred = ranges::equal_to>
   constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2,
                                         Pred pred = {},
-                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // Since C++20
+                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20
 
   template<forward_range R1, forward_range R2,
          class Proj1 = identity, class Proj2 = identity,
          indirect_equivalence_relation<projected<iterator_t<R1>, Proj1>,
                                        projected<iterator_t<R2>, Proj2>> Pred = ranges::equal_to>
   constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {},
-                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // Since C++20
+                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20
 
   template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,
            sentinel_for<I2> S2, class Pred = ranges::equal_to,
@@ -904,35 +904,35 @@ namespace ranges {
            indirect_strict_weak_order<projected<I1, Proj1>, projected<I2, Proj2>> Comp =
              ranges::less>
     constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {},
-                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // Since C++20
+                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++20
 
   template<input_range R1, input_range R2, class Proj1 = identity,
            class Proj2 = identity,
            indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>,
                                       projected<iterator_t<R2>, Proj2>> Comp = ranges::less>
     constexpr bool includes(R1&& r1, R2&& r2, Comp comp = {},
-                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // Since C++20
+                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++20
 
   template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
            class Proj = identity>
     requires sortable<I, Comp, Proj>
-    I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {});                    // Since C++20
+    I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {});                    // since C++20
 
   template<bidirectional_range R, class Comp = ranges::less, class Proj = identity>
     requires sortable<iterator_t<R>, Comp, Proj>
     borrowed_iterator_t<R>
       inplace_merge(R&& r, iterator_t<R> middle, Comp comp = {},
-                    Proj proj = {});                                                               // Since C++20
+                    Proj proj = {});                                                               // since C++20
 
   template<permutable I, sentinel_for<I> S, class Proj = identity,
            indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
-    constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {});                    // Since C++20
+    constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {});                    // since C++20
 
   template<forward_range R, class Proj = identity,
            indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
     requires permutable<iterator_t<R>>
     constexpr borrowed_subrange_t<R>
-      unique(R&& r, C comp = {}, Proj proj = {});                                                  // Since C++20
+      unique(R&& r, C comp = {}, Proj proj = {});                                                  // since C++20
 
   template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,
            indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
@@ -941,7 +941,7 @@ namespace ranges {
               (input_iterator<O> && same_as<iter_value_t<I>, iter_value_t<O>>) ||
               indirectly_copyable_storable<I, O>)
     constexpr unique_copy_result<I, O>
-      unique_copy(I first, S last, O result, C comp = {}, Proj proj = {});                         // Since C++20
+      unique_copy(I first, S last, O result, C comp = {}, Proj proj = {});                         // since C++20
 
   template<input_range R, weakly_incrementable O, class Proj = identity,
            indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
@@ -950,41 +950,41 @@ namespace ranges {
               (input_iterator<O> && same_as<range_value_t<R>, iter_value_t<O>>) ||
               indirectly_copyable_storable<iterator_t<R>, O>)
     constexpr unique_copy_result<borrowed_iterator_t<R>, O>
-      unique_copy(R&& r, O result, C comp = {}, Proj proj = {});                                   // Since C++20
+      unique_copy(R&& r, O result, C comp = {}, Proj proj = {});                                   // since C++20
 
   template<class I, class O>
-      using remove_copy_result = in_out_result<I, O>;                                              // Since C++20
+      using remove_copy_result = in_out_result<I, O>;                                              // since C++20
 
   template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class T,
            class Proj = identity>
              indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
     constexpr remove_copy_result<I, O>
-      remove_copy(I first, S last, O result, const T& value, Proj proj = {});                      // Since C++20
+      remove_copy(I first, S last, O result, const T& value, Proj proj = {});                      // since C++20
 
   template<input_range R, weakly_incrementable O, class T, class Proj = identity>
     requires indirectly_copyable<iterator_t<R>, O> &&
              indirect_binary_predicate<ranges::equal_to,
                                        projected<iterator_t<R>, Proj>, const T*>
     constexpr remove_copy_result<borrowed_iterator_t<R>, O>
-      remove_copy(R&& r, O result, const T& value, Proj proj = {});                                // Since C++20
+      remove_copy(R&& r, O result, const T& value, Proj proj = {});                                // since C++20
 
   template<class I, class O>
-      using remove_copy_if_result = in_out_result<I, O>;                                           // Since C++20
+      using remove_copy_if_result = in_out_result<I, O>;                                           // since C++20
 
   template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,
            class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
     requires indirectly_copyable<I, O>
     constexpr remove_copy_if_result<I, O>
-      remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {});                        // Since C++20
+      remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {});                        // since C++20
 
   template<input_range R, weakly_incrementable O, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     requires indirectly_copyable<iterator_t<R>, O>
     constexpr remove_copy_if_result<borrowed_iterator_t<R>, O>
-      remove_copy_if(R&& r, O result, Pred pred, Proj proj = {});                                  // Since C++20
+      remove_copy_if(R&& r, O result, Pred pred, Proj proj = {});                                  // since C++20
 
   template<class I, class O>
-      using replace_copy_result = in_out_result<I, O>;                                             // Since C++20
+      using replace_copy_result = in_out_result<I, O>;                                             // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class T1, class T2,
            output_iterator<const T2&> O, class Proj = identity>
@@ -992,7 +992,7 @@ namespace ranges {
              indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>
     constexpr replace_copy_result<I, O>
       replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value,
-                   Proj proj = {});                                                                // Since C++20
+                   Proj proj = {});                                                                // since C++20
 
   template<input_range R, class T1, class T2, output_iterator<const T2&> O,
            class Proj = identity>
@@ -1001,54 +1001,54 @@ namespace ranges {
                                        projected<iterator_t<R>, Proj>, const T1*>
     constexpr replace_copy_result<borrowed_iterator_t<R>, O>
       replace_copy(R&& r, O result, const T1& old_value, const T2& new_value,
-                   Proj proj = {});                                                                // Since C++20
+                   Proj proj = {});                                                                // since C++20
 
   template<class I, class O>
-      using replace_copy_if_result = in_out_result<I, O>;                                          // Since C++20
+      using replace_copy_if_result = in_out_result<I, O>;                                          // since C++20
 
   template<input_iterator I, sentinel_for<I> S, class T, output_iterator<const T&> O,
            class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
     requires indirectly_copyable<I, O>
     constexpr replace_copy_if_result<I, O>
       replace_copy_if(I first, S last, O result, Pred pred, const T& new_value,
-                      Proj proj = {});                                                             // Since C++20
+                      Proj proj = {});                                                             // since C++20
 
   template<input_range R, class T, output_iterator<const T&> O, class Proj = identity,
            indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
     requires indirectly_copyable<iterator_t<R>, O>
     constexpr replace_copy_if_result<borrowed_iterator_t<R>, O>
       replace_copy_if(R&& r, O result, Pred pred, const T& new_value,
-                      Proj proj = {});                                                             // Since C++20
+                      Proj proj = {});                                                             // since C++20
 
   template<class I>
-    using prev_permutation_result = in_found_result<I>;                                            // Since C++20
+    using prev_permutation_result = in_found_result<I>;                                            // since C++20
 
   template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
            class Proj = identity>
     requires sortable<I, Comp, Proj>
     constexpr ranges::prev_permutation_result<I>
-      ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // Since C++20
+      ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20
 
   template<bidirectional_range R, class Comp = ranges::less,
            class Proj = identity>
     requires sortable<iterator_t<R>, Comp, Proj>
     constexpr ranges::prev_permutation_result<borrowed_iterator_t<R>>
-      ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // Since C++20
+      ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20
 
   template<class I>
-    using next_permutation_result = in_found_result<I>;                                            // Since C++20
+    using next_permutation_result = in_found_result<I>;                                            // since C++20
 
   template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
            class Proj = identity>
     requires sortable<I, Comp, Proj>
     constexpr ranges::next_permutation_result<I>
-      ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // Since C++20
+      ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20
 
   template<bidirectional_range R, class Comp = ranges::less,
            class Proj = identity>
     requires sortable<iterator_t<R>, Comp, Proj>
     constexpr ranges::next_permutation_result<borrowed_iterator_t<R>>
-      ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // Since C++20
+      ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20
 
 }
 

diff  --git a/libcxx/include/functional b/libcxx/include/functional
index 23baa2cf6fe77..bb5db290f5a43 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -257,10 +257,10 @@ public:
 };
 
 template <class Operation, class T>
-binder1st<Operation> bind1st(const Operation& op, const T& x);  // deprecated in C++11, removed in C++17
+binder1st<Operation> bind1st(const Operation& op, const T& x);                  // deprecated in C++11, removed in C++17
 
 template <class Operation>
-class binder2nd     // deprecated in C++11, removed in C++17
+class binder2nd                                                                 // deprecated in C++11, removed in C++17
     : public unary_function<typename Operation::first_argument_type,
                             typename Operation::result_type>
 {
@@ -274,9 +274,9 @@ public:
 };
 
 template <class Operation, class T>
-binder2nd<Operation> bind2nd(const Operation& op, const T& x);  // deprecated in C++11, removed in C++17
+binder2nd<Operation> bind2nd(const Operation& op, const T& x);                  // deprecated in C++11, removed in C++17
 
-template <class Arg, class Result>      // deprecated in C++11, removed in C++17
+template <class Arg, class Result>                                              // deprecated in C++11, removed in C++17
 class pointer_to_unary_function : public unary_function<Arg, Result>
 {
 public:
@@ -285,9 +285,9 @@ public:
 };
 
 template <class Arg, class Result>
-pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg));      // deprecated in C++11, removed in C++17
+pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg));                // deprecated in C++11, removed in C++17
 
-template <class Arg1, class Arg2, class Result>      // deprecated in C++11, removed in C++17
+template <class Arg1, class Arg2, class Result>                                 // deprecated in C++11, removed in C++17
 class pointer_to_binary_function : public binary_function<Arg1, Arg2, Result>
 {
 public:
@@ -296,9 +296,9 @@ public:
 };
 
 template <class Arg1, class Arg2, class Result>
-pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1,Arg2));      // deprecated in C++11, removed in C++17
+pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1,Arg2));   // deprecated in C++11, removed in C++17
 
-template<class S, class T>      // deprecated in C++11, removed in C++17
+template<class S, class T>                                                      // deprecated in C++11, removed in C++17
 class mem_fun_t : public unary_function<T*, S>
 {
 public:
@@ -307,18 +307,18 @@ public:
 };
 
 template<class S, class T, class A>
-class mem_fun1_t : public binary_function<T*, A, S>      // deprecated in C++11, removed in C++17
+class mem_fun1_t : public binary_function<T*, A, S>                             // deprecated in C++11, removed in C++17
 {
 public:
     explicit mem_fun1_t(S (T::*p)(A));
     S operator()(T* p, A x) const;
 };
 
-template<class S, class T>          mem_fun_t<S,T>    mem_fun(S (T::*f)());      // deprecated in C++11, removed in C++17
-template<class S, class T, class A> mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));     // deprecated in C++11, removed in C++17
+template<class S, class T>          mem_fun_t<S,T>    mem_fun(S (T::*f)());     // deprecated in C++11, removed in C++17
+template<class S, class T, class A> mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));    // deprecated in C++11, removed in C++17
 
 template<class S, class T>
-class mem_fun_ref_t : public unary_function<T, S>      // deprecated in C++11, removed in C++17
+class mem_fun_ref_t : public unary_function<T, S>                               // deprecated in C++11, removed in C++17
 {
 public:
     explicit mem_fun_ref_t(S (T::*p)());
@@ -326,18 +326,20 @@ public:
 };
 
 template<class S, class T, class A>
-class mem_fun1_ref_t : public binary_function<T, A, S>      // deprecated in C++11, removed in C++17
+class mem_fun1_ref_t : public binary_function<T, A, S>                          // deprecated in C++11, removed in C++17
 {
 public:
     explicit mem_fun1_ref_t(S (T::*p)(A));
     S operator()(T& p, A x) const;
 };
 
-template<class S, class T>          mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)());      // deprecated in C++11, removed in C++17
-template<class S, class T, class A> mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));     // deprecated in C++11, removed in C++17
+template<class S, class T>
+mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)());                                 // deprecated in C++11, removed in C++17
+template<class S, class T, class A>
+mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));                                // deprecated in C++11, removed in C++17
 
 template <class S, class T>
-class const_mem_fun_t : public unary_function<const T*, S>      // deprecated in C++11, removed in C++17
+class const_mem_fun_t : public unary_function<const T*, S>                      // deprecated in C++11, removed in C++17
 {
 public:
     explicit const_mem_fun_t(S (T::*p)() const);
@@ -345,18 +347,20 @@ public:
 };
 
 template <class S, class T, class A>
-class const_mem_fun1_t : public binary_function<const T*, A, S>      // deprecated in C++11, removed in C++17
+class const_mem_fun1_t : public binary_function<const T*, A, S>                 // deprecated in C++11, removed in C++17
 {
 public:
     explicit const_mem_fun1_t(S (T::*p)(A) const);
     S operator()(const T* p, A x) const;
 };
 
-template <class S, class T>          const_mem_fun_t<S,T>    mem_fun(S (T::*f)() const);      // deprecated in C++11, removed in C++17
-template <class S, class T, class A> const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);     // deprecated in C++11, removed in C++17
+template <class S, class T>
+const_mem_fun_t<S,T>    mem_fun(S (T::*f)() const);                             // deprecated in C++11, removed in C++17
+template <class S, class T, class A>
+const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);                            // deprecated in C++11, removed in C++17
 
 template <class S, class T>
-class const_mem_fun_ref_t : public unary_function<T, S>      // deprecated in C++11, removed in C++17
+class const_mem_fun_ref_t : public unary_function<T, S>                         // deprecated in C++11, removed in C++17
 {
 public:
     explicit const_mem_fun_ref_t(S (T::*p)() const);
@@ -364,18 +368,19 @@ public:
 };
 
 template <class S, class T, class A>
-class const_mem_fun1_ref_t : public binary_function<T, A, S>      // deprecated in C++11, removed in C++17
+class const_mem_fun1_ref_t : public binary_function<T, A, S>                    // deprecated in C++11, removed in C++17
 {
 public:
     explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
     S operator()(const T& p, A x) const;
 };
 
-template <class S, class T>          const_mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)() const);   // deprecated in C++11, removed in C++17
-template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);  // deprecated in C++11, removed in C++17
+template <class S, class T>
+const_mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)() const);                     // deprecated in C++11, removed in C++17
+template <class S, class T, class A>
+const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);                    // deprecated in C++11, removed in C++17
 
-template<class R, class T>
-constexpr unspecified mem_fn(R T::*); // constexpr in C++20
+template<class R, class T> constexpr unspecified mem_fn(R T::*);                // constexpr in C++20
 
 class bad_function_call
     : public exception

diff  --git a/libcxx/include/utility b/libcxx/include/utility
index a4d8cf853d20b..845b542132d30 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -117,24 +117,30 @@ struct common_type<pair<T1, T2>, pair<U1, U2>>;
 
 template<class T1, class T2> pair(T1, T2) -> pair<T1, T2>;
 
-template <class T1, class T2> bool operator==(const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14
-template <class T1, class T2> bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14, removed in C++20
-template <class T1, class T2> bool operator< (const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14, removed in C++20
-template <class T1, class T2> bool operator> (const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14, removed in C++20
-template <class T1, class T2> bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14, removed in C++20
-template <class T1, class T2> bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&); // constexpr in C++14, removed in C++20
+template <class T1, class T2>
+bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14
+template <class T1, class T2>
+bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14, removed in C++20
+template <class T1, class T2>
+bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14, removed in C++20
+template <class T1, class T2>
+bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14, removed in C++20
+template <class T1, class T2>
+bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14, removed in C++20
+template <class T1, class T2>
+bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);                         // constexpr in C++14, removed in C++20
 template <class T1, class T2>
   constexpr common_comparison_type_t<synth-three-way-result<T1>,
                                      synth-three-way-result<T2>>
-    operator<=>(const pair<T1,T2>&, const pair<T1,T2>&);                               // C++20
+    operator<=>(const pair<T1,T2>&, const pair<T1,T2>&);                         // C++20
 
 template <class T1, class T2> pair<V1, V2> make_pair(T1&&, T2&&);                // constexpr in C++14
 template <class T1, class T2>
 void
 swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));            // constexpr in C++20
 
-template<class T1, class T2>
-constexpr void swap(const pair<T1, T2>& x, const pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));    // since C++23
+template<class T1, class T2>                                                     // since C++23
+constexpr void swap(const pair<T1, T2>& x, const pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));
 
 struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
 inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
@@ -208,8 +214,8 @@ template<class... T>
   using index_sequence_for = make_index_sequence<sizeof...(T)>;
 
 template<class T, class U=T>
-    constexpr T exchange(T& obj, U&& new_value)
-      noexcept(is_nothrow_move_constructible<T>::value && is_nothrow_assignable<T&, U>::value); // constexpr in C++17, noexcept in C++23
+    constexpr T exchange(T& obj, U&& new_value)                                 // constexpr in C++17, noexcept in C++23
+      noexcept(is_nothrow_move_constructible<T>::value && is_nothrow_assignable<T&, U>::value);
 
 // 20.2.7, in-place construction // C++17
 struct in_place_t {

diff  --git a/libcxx/test/.clang-format b/libcxx/test/.clang-format
new file mode 100644
index 0000000000000..b446ff718d7ad
--- /dev/null
+++ b/libcxx/test/.clang-format
@@ -0,0 +1,5 @@
+BasedOnStyle: InheritParentConfig
+
+# Disable formatting options which may break tests.
+SortIncludes: false
+ReflowComments: false


        


More information about the libcxx-commits mailing list