[libcxx-commits] [libcxx] cba72e4 - [libc++] Normalize some whitespace in preparation for D116570. NFC.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 15 09:21:59 PST 2022


Author: Arthur O'Dwyer
Date: 2022-01-15T12:20:33-05:00
New Revision: cba72e4ce215198dffc2b74c929e2faf664d0006

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

LOG: [libc++] Normalize some whitespace in preparation for D116570. NFC.

Added: 
    

Modified: 
    libcxx/include/__memory/ranges_construct_at.h
    libcxx/include/__memory/ranges_uninitialized_algorithms.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h
index 99ae299089d30..9b0edb7c2562d 100644
--- a/libcxx/include/__memory/ranges_construct_at.h
+++ b/libcxx/include/__memory/ranges_construct_at.h
@@ -38,9 +38,7 @@ namespace ranges {
 namespace __construct_at {
 
 struct __fn final : private __function_like {
-
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
+  _LIBCPP_HIDE_FROM_ABI constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template<class _Tp, class... _Args, class = decltype(
     ::new (declval<void*>()) _Tp(declval<_Args>()...)
@@ -49,13 +47,12 @@ struct __fn final : private __function_like {
   constexpr _Tp* operator()(_Tp* __location, _Args&& ...__args) const {
     return _VSTD::construct_at(__location, _VSTD::forward<_Args>(__args)...);
   }
-
 };
 
 } // namespace __construct_at
 
 inline namespace __cpo {
-inline constexpr auto construct_at = __construct_at::__fn(__function_like::__tag());
+  inline constexpr auto construct_at = __construct_at::__fn(__function_like::__tag());
 } // namespace __cpo
 
 // destroy_at
@@ -63,22 +60,19 @@ inline constexpr auto construct_at = __construct_at::__fn(__function_like::__tag
 namespace __destroy_at {
 
 struct __fn final : private __function_like {
-
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
+  _LIBCPP_HIDE_FROM_ABI constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template <destructible _Tp>
   _LIBCPP_HIDE_FROM_ABI
   constexpr void operator()(_Tp* __location) const noexcept {
     _VSTD::destroy_at(__location);
   }
-
 };
 
 } // namespace __destroy_at
 
 inline namespace __cpo {
-inline constexpr auto destroy_at = __destroy_at::__fn(__function_like::__tag());
+  inline constexpr auto destroy_at = __destroy_at::__fn(__function_like::__tag());
 } // namespace __cpo
 
 // destroy
@@ -86,9 +80,7 @@ inline constexpr auto destroy_at = __destroy_at::__fn(__function_like::__tag());
 namespace __destroy {
 
 struct __fn final : private __function_like {
-
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
+  _LIBCPP_HIDE_FROM_ABI constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template <__nothrow_input_iterator _InputIterator, __nothrow_sentinel_for<_InputIterator> _Sentinel>
     requires destructible<iter_value_t<_InputIterator>>
@@ -103,13 +95,12 @@ struct __fn final : private __function_like {
   constexpr borrowed_iterator_t<_InputRange> operator()(_InputRange&& __range) const noexcept {
     return (*this)(ranges::begin(__range), ranges::end(__range));
   }
-
 };
 
 } // namespace __destroy
 
 inline namespace __cpo {
-inline constexpr auto destroy = __destroy::__fn(__function_like::__tag());
+  inline constexpr auto destroy = __destroy::__fn(__function_like::__tag());
 } // namespace __cpo
 
 // destroy_n
@@ -117,9 +108,7 @@ inline constexpr auto destroy = __destroy::__fn(__function_like::__tag());
 namespace __destroy_n {
 
 struct __fn final : private __function_like {
-
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
+  _LIBCPP_HIDE_FROM_ABI constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template <__nothrow_input_iterator _InputIterator>
     requires destructible<iter_value_t<_InputIterator>>
@@ -127,13 +116,12 @@ struct __fn final : private __function_like {
   constexpr _InputIterator operator()(_InputIterator __first, iter_
diff erence_t<_InputIterator> __n) const noexcept {
     return _VSTD::destroy_n(_VSTD::move(__first), __n);
   }
-
 };
 
 } // namespace __destroy_n
 
 inline namespace __cpo {
-inline constexpr auto destroy_n = __destroy_n::__fn(__function_like::__tag());
+  inline constexpr auto destroy_n = __destroy_n::__fn(__function_like::__tag());
 } // namespace __cpo
 
 } // namespace ranges

diff  --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index 09786ffc69731..8cd2748e45c97 100644
--- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -41,7 +41,6 @@ namespace ranges {
 namespace __uninitialized_default_construct {
 
 struct __fn final : private __function_like {
-
   constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template <__nothrow_forward_iterator _ForwardIterator,
@@ -58,14 +57,12 @@ struct __fn final : private __function_like {
   borrowed_iterator_t<_ForwardRange> operator()(_ForwardRange&& __range) const {
     return (*this)(ranges::begin(__range), ranges::end(__range));
   }
-
 };
 
 } // namespace __uninitialized_default_construct
 
 inline namespace __cpo {
-  inline constexpr auto uninitialized_default_construct =
-      __uninitialized_default_construct::__fn(__function_like::__tag());
+  inline constexpr auto uninitialized_default_construct = __uninitialized_default_construct::__fn(__function_like::__tag());
 } // namespace __cpo
 
 // uninitialized_default_construct_n
@@ -73,9 +70,7 @@ inline namespace __cpo {
 namespace __uninitialized_default_construct_n {
 
 struct __fn final : private __function_like {
-
-  constexpr explicit __fn(__tag __x) noexcept :
-      __function_like(__x) {}
+  constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
   template <__nothrow_forward_iterator _ForwardIterator>
     requires default_initializable<iter_value_t<_ForwardIterator>>
@@ -84,7 +79,6 @@ struct __fn final : private __function_like {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
     return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n);
   }
-
 };
 
 } // namespace __uninitialized_default_construct_n
@@ -215,10 +209,8 @@ using uninitialized_copy_result = in_out_result<_InputIterator, _OutputIterator>
 namespace __uninitialized_copy {
 
 struct __fn final : private __function_like {
-
   constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
-  // clang-format off
   template <input_iterator _InputIterator,
             sentinel_for<_InputIterator> _Sentinel1,
             __nothrow_forward_iterator _OutputIterator,
@@ -226,7 +218,6 @@ struct __fn final : private __function_like {
     requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
   uninitialized_copy_result<_InputIterator, _OutputIterator>
   operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
-    // clang-format on
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
 
     auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
@@ -234,14 +225,12 @@ struct __fn final : private __function_like {
     return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
   }
 
-  // clang-format off
   template <input_range _InputRange, __nothrow_forward_range _OutputRange>
     requires constructible_from<range_value_t<_OutputRange>, range_reference_t<_InputRange>>
   uninitialized_copy_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>>
   operator()( _InputRange&& __in_range, _OutputRange&& __out_range) const {
-    // clang-format on
-    return (*this)(ranges::begin(__in_range), ranges::end(__in_range), ranges::begin(__out_range),
-                   ranges::end(__out_range));
+    return (*this)(ranges::begin(__in_range), ranges::end(__in_range),
+                   ranges::begin(__out_range), ranges::end(__out_range));
   }
 };
 
@@ -259,10 +248,8 @@ using uninitialized_copy_n_result = in_out_result<_InputIterator, _OutputIterato
 namespace __uninitialized_copy_n {
 
 struct __fn final : private __function_like {
-
   constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
-  // clang-format off
   template <input_iterator _InputIterator,
            __nothrow_forward_iterator _OutputIterator,
            __nothrow_sentinel_for<_OutputIterator> _Sentinel>
@@ -270,14 +257,11 @@ struct __fn final : private __function_like {
   uninitialized_copy_n_result<_InputIterator, _OutputIterator>
   operator()(_InputIterator __ifirst, iter_
diff erence_t<_InputIterator> __n,
              _OutputIterator __ofirst, _Sentinel __olast) const {
-    // clang-format on
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
-
-    auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst),
-                                                              _VSTD::move(__olast));
+    auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n,
+                                                              _VSTD::move(__ofirst), _VSTD::move(__olast));
     return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
   }
-
 };
 
 } // namespace __uninitialized_copy_n
@@ -294,10 +278,8 @@ using uninitialized_move_result = in_out_result<_InputIterator, _OutputIterator>
 namespace __uninitialized_move {
 
 struct __fn final : private __function_like {
-
   constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
-  // clang-format off
   template <input_iterator _InputIterator,
             sentinel_for<_InputIterator> _Sentinel1,
             __nothrow_forward_iterator _OutputIterator,
@@ -305,7 +287,6 @@ struct __fn final : private __function_like {
     requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
   uninitialized_move_result<_InputIterator, _OutputIterator>
   operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
-    // clang-format on
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
     auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
 
@@ -314,16 +295,13 @@ struct __fn final : private __function_like {
     return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
   }
 
-  // clang-format off
   template <input_range _InputRange, __nothrow_forward_range _OutputRange>
     requires constructible_from<range_value_t<_OutputRange>, range_reference_t<_InputRange>>
   uninitialized_move_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>>
   operator()(_InputRange&& __in_range, _OutputRange&& __out_range) const {
-    // clang-format on
-    return (*this)(ranges::begin(__in_range), ranges::end(__in_range), ranges::begin(__out_range),
-                   ranges::end(__out_range));
+    return (*this)(ranges::begin(__in_range), ranges::end(__in_range),
+                   ranges::begin(__out_range), ranges::end(__out_range));
   }
-
 };
 
 } // namespace __uninitialized_move
@@ -340,18 +318,15 @@ using uninitialized_move_n_result = in_out_result<_InputIterator, _OutputIterato
 namespace __uninitialized_move_n {
 
 struct __fn final : private __function_like {
-
   constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {}
 
-  // clang-format off
   template <input_iterator _InputIterator,
            __nothrow_forward_iterator _OutputIterator,
            __nothrow_sentinel_for<_OutputIterator> _Sentinel>
     requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
   uninitialized_move_n_result<_InputIterator, _OutputIterator>
-  operator()(_InputIterator __ifirst, iter_
diff erence_t<_InputIterator> __n, _OutputIterator __ofirst,
-             _Sentinel __olast) const {
-    // clang-format on
+  operator()(_InputIterator __ifirst, iter_
diff erence_t<_InputIterator> __n,
+             _OutputIterator __ofirst, _Sentinel __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
     auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
 
@@ -359,7 +334,6 @@ struct __fn final : private __function_like {
                                                               _VSTD::move(__olast), __iter_move);
     return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
   }
-
 };
 
 } // namespace __uninitialized_move_n


        


More information about the libcxx-commits mailing list