[libcxx-commits] [libcxx] [libc++][NFC] Reformat `subrange.h` (PR #177118)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 21 00:49:28 PST 2026


https://github.com/H-G-Hristov created https://github.com/llvm/llvm-project/pull/177118

As a pre-requisite to https://github.com/llvm/llvm-project/pull/176936

>From 40fa2d357171704a0b418dedc263af9b95096173 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Wed, 21 Jan 2026 10:49:06 +0200
Subject: [PATCH] [libc++][NFC] Reformat `subrange.h`

As a pre-requisite to https://github.com/llvm/llvm-project/pull/176936
---
 libcxx/include/__ranges/subrange.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index df8766216dbe2..87e1991a1f3b9 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -201,11 +201,12 @@ template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
 subrange(_Iter, _Sent, make_unsigned_t<iter_difference_t<_Iter>>) -> subrange<_Iter, _Sent, subrange_kind::sized>;
 
 template <borrowed_range _Range>
-subrange(_Range&&) -> subrange<iterator_t<_Range>,
-                               sentinel_t<_Range>,
-                               (sized_range<_Range> || sized_sentinel_for<sentinel_t<_Range>, iterator_t<_Range>>)
-                                   ? subrange_kind::sized
-                                   : subrange_kind::unsized>;
+subrange(_Range&&)
+    -> subrange<iterator_t<_Range>,
+                sentinel_t<_Range>,
+                (sized_range<_Range> || sized_sentinel_for<sentinel_t<_Range>, iterator_t<_Range>>)
+                    ? subrange_kind::sized
+                    : subrange_kind::unsized>;
 
 template <borrowed_range _Range>
 subrange(_Range&&, make_unsigned_t<range_difference_t<_Range>>)



More information about the libcxx-commits mailing list