[libcxx-commits] [libcxx] [libc++][ranges][NFC] Consistency improvements after P3050 (PR #213062)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 30 09:28:42 PDT 2026
https://github.com/H-G-Hristov created https://github.com/llvm/llvm-project/pull/213062
Use concepts, instead of type traits consistently and other small tweaks.
A follow-up to https://github.com/llvm/llvm-project/pull/193891
>From fb39d41a55ce8b74598531121e605923e9ce9cd3 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Thu, 30 Jul 2026 18:37:08 +0300
Subject: [PATCH] [libc++][ranges][NFC] Consistency improvements after P3050
Use concepts, instead of type traits consistently and other small tweaks.
A follow-up to https://github.com/llvm/llvm-project/pull/193891
---
.../iterator/ctor.base.compile.pass.cpp | 6 +++---
.../sentinel/ctor.base.compile.pass.cpp | 6 +++---
.../iterator/ctor.parent.iter.compile.pass.cpp | 1 +
.../sentinel/ctor.parent.compile.pass.cpp | 1 +
.../ctor.parent.compile.pass.cpp | 6 ++++--
.../ctor.outer_iterator.compile.pass.cpp | 9 +++++----
.../ctor.parent.base.compile.pass.cpp | 5 +++--
.../ctor.parent.compile.pass.cpp | 7 ++++---
.../range.split/iterator/base.pass.cpp | 4 +++-
.../ctor.parent.iter.subrange.compile.pass.cpp | 4 ++--
.../range.split/iterator/deref.pass.cpp | 6 +++++-
.../sentinel/ctor.parent.compile.pass.cpp | 5 +++--
.../sentinel/ctor.base.pred.compile.pass.cpp | 4 ++--
.../sentinel/ctor.convert.pass.cpp | 6 +++---
.../range.take.sentinel/ctor.base.compile.pass.cpp | 6 +++---
.../iterator/ctor.parent.iter.compile.pass.cpp | 3 ++-
.../sentinel/ctor.base.compile.pass.cpp | 5 +++--
.../iterator/ctor.value.compile.pass.cpp | 14 +++++++++-----
.../sentinel/ctor.value.compile.pass.cpp | 7 ++++---
.../iterator/ctor.parent.compile.pass.cpp | 2 +-
20 files changed, 64 insertions(+), 43 deletions(-)
diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.base.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.base.compile.pass.cpp
index b43a60276e280..b13b1a3cf91e1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/ctor.base.compile.pass.cpp
@@ -12,12 +12,12 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include <tuple>
-#include <type_traits>
using BaseIter = std::tuple<int>*;
using ElementsIter = std::ranges::iterator_t<std::ranges::elements_view<std::ranges::subrange<BaseIter, BaseIter>, 0>>;
-static_assert(!std::is_constructible_v<ElementsIter, BaseIter>);
-static_assert(!std::is_convertible_v<BaseIter, ElementsIter>);
+static_assert(!std::constructible_from<ElementsIter, BaseIter>);
+static_assert(!std::convertible_to<BaseIter, ElementsIter>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.base.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.base.compile.pass.cpp
index bbdc797b03e9c..206c5fd95f996 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/ctor.base.compile.pass.cpp
@@ -12,8 +12,8 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
struct Sent {
int i;
@@ -28,5 +28,5 @@ struct Range : std::ranges::view_base {
using ElementsView = std::ranges::elements_view<Range, 0>;
-static_assert(!std::is_constructible_v<std::ranges::sentinel_t<ElementsView>, Sent>);
-static_assert(!std::is_convertible_v<Sent, std::ranges::sentinel_t<ElementsView>>);
+static_assert(!std::constructible_from<std::ranges::sentinel_t<ElementsView>, Sent>);
+static_assert(!std::convertible_to<Sent, std::ranges::sentinel_t<ElementsView>>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent.iter.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent.iter.compile.pass.cpp
index 47deabb7136c6..6f196243e34d9 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent.iter.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent.iter.compile.pass.cpp
@@ -12,6 +12,7 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "test_iterators.h"
diff --git a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.compile.pass.cpp
index 06e06aeb6db6e..dadf674c5e617 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.compile.pass.cpp
@@ -12,6 +12,7 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "test_iterators.h"
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/ctor.parent.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/ctor.parent.compile.pass.cpp
index 504c945e3d918..008f0f1811679 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/ctor.parent.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/ctor.parent.compile.pass.cpp
@@ -12,10 +12,12 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "../types.h"
using Parent = std::ranges::join_view<ParentView<ChildView>>;
-static_assert(!std::is_constructible_v<std::ranges::sentinel_t<Parent>, Parent&>);
-static_assert(!std::is_convertible_v<std::ranges::sentinel_t<Parent>, Parent&>);
+
+static_assert(!std::constructible_from<std::ranges::sentinel_t<Parent>, Parent&>);
+static_assert(!std::convertible_to<std::ranges::sentinel_t<Parent>, Parent&>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.compile.pass.cpp
index 37fe2fadfd41a..7b3f7b0731cf2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.compile.pass.cpp
@@ -12,12 +12,13 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "../types.h"
-static_assert(!std::is_constructible_v<InnerIterConst, OuterIterConst>);
-static_assert(!std::is_convertible_v<InnerIterConst, OuterIterConst>);
+static_assert(!std::constructible_from<InnerIterConst, OuterIterConst>);
+static_assert(!std::convertible_to<InnerIterConst, OuterIterConst>);
-static_assert(!std::is_constructible_v<InnerIterNonConst, OuterIterNonConst>);
-static_assert(!std::is_convertible_v<InnerIterNonConst, OuterIterNonConst>);
+static_assert(!std::constructible_from<InnerIterNonConst, OuterIterNonConst>);
+static_assert(!std::convertible_to<InnerIterNonConst, OuterIterNonConst>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.base.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.base.compile.pass.cpp
index 70e97ea04f5c0..95478981865b9 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.base.compile.pass.cpp
@@ -13,10 +13,11 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "../types.h"
static_assert(std::ranges::forward_range<SplitViewForward>);
-static_assert(!std::is_constructible_v<OuterIterForward, SplitViewForward&, std::ranges::iterator_t<ForwardView>>);
+
+static_assert(!std::constructible_from<OuterIterForward, SplitViewForward&, std::ranges::iterator_t<ForwardView>>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.compile.pass.cpp
index b838970718c8a..a0cb79544d66a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.compile.pass.cpp
@@ -13,11 +13,12 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "../types.h"
static_assert(!std::ranges::forward_range<SplitViewInput>);
-static_assert(!std::is_constructible_v<OuterIterInput, SplitViewInput&>);
-static_assert(!std::is_convertible_v<SplitViewInput&, OuterIterInput>);
+
+static_assert(!std::constructible_from<OuterIterInput, SplitViewInput&>);
+static_assert(!std::convertible_to<SplitViewInput&, OuterIterInput>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/base.pass.cpp
index 8e8eff8a12b97..e2a884c0d7f1c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/base.pass.cpp
@@ -16,9 +16,11 @@
#include "../types.h"
struct Iter : ForwardIterBase<Iter> {
- int i = 0;
+ int i = 0;
+
constexpr Iter() = default;
constexpr Iter(int ii) : i(ii) {}
+
constexpr int operator*() const { return i; }
constexpr Iter& operator++() {
++i;
diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.parent.iter.subrange.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.parent.iter.subrange.compile.pass.cpp
index 9f4e9a13e0447..b18045b2e784e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.parent.iter.subrange.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.parent.iter.subrange.compile.pass.cpp
@@ -12,8 +12,8 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "../types.h"
@@ -35,4 +35,4 @@ struct TracedMoveView : std::ranges::view_base {
using SplitView = std::ranges::split_view<TracedMoveView, TracedMoveView>;
using SplitIter = std::ranges::iterator_t<SplitView>;
-static_assert(!std::is_constructible_v<SplitIter, SplitView, TracedMoveIter, std::ranges::subrange<TracedMoveIter>>);
+static_assert(!std::constructible_from<SplitIter, SplitView, TracedMoveIter, std::ranges::subrange<TracedMoveIter>>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/deref.pass.cpp
index 0e9812020fb38..1906c48aff5e3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/deref.pass.cpp
@@ -17,9 +17,11 @@
#include "../types.h"
struct Iter : ForwardIterBase<Iter> {
- int i = 0;
+ int i = 0;
+
constexpr Iter() = default;
constexpr Iter(int ii) : i(ii) {}
+
constexpr int operator*() const { return i; }
constexpr Iter& operator++() {
++i;
@@ -38,8 +40,10 @@ constexpr bool test() {
using SplitIter = std::ranges::iterator_t<SplitView>;
SplitView sv{std::ranges::subrange<Iter>{Iter{5}, Iter{8}}, std::ranges::subrange<Iter>{Iter{7}, Iter{8}}};
+
const SplitIter it = sv.begin();
std::same_as<std::ranges::subrange<Iter>> decltype(auto) value = *it;
+
assert(value.begin().i == 5);
assert(value.end().i == 7);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/sentinel/ctor.parent.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/sentinel/ctor.parent.compile.pass.cpp
index e0e8029c4c538..3c6c0d007ea12 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.split/sentinel/ctor.parent.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.split/sentinel/ctor.parent.compile.pass.cpp
@@ -12,6 +12,7 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "../types.h"
@@ -20,5 +21,5 @@ using Range = std::ranges::subrange<int*, sentinel_wrapper<int*>>;
using SplitView = std::ranges::split_view<Range, std::ranges::single_view<int>>;
using SplitSent = std::ranges::sentinel_t<SplitView>;
-static_assert(!std::is_constructible_v<SplitSent, SplitView&>);
-static_assert(!std::is_convertible_v<SplitView&, SplitSent>);
+static_assert(!std::constructible_from<SplitSent, SplitView&>);
+static_assert(!std::convertible_to<SplitView&, SplitSent>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.base.pred.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.base.pred.compile.pass.cpp
index a66e3d1e84c6e..ae96b8e12c3c3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.base.pred.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.base.pred.compile.pass.cpp
@@ -12,8 +12,8 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
struct Sent {
int i;
@@ -32,4 +32,4 @@ struct Pred {
using Sentinel = std::ranges::sentinel_t<std::ranges::take_while_view<Range, Pred>>;
-static_assert(!std::is_constructible_v<Sentinel, std::ranges::sentinel_t<Range>, const Pred*>);
+static_assert(!std::constructible_from<Sentinel, std::ranges::sentinel_t<Range>, const Pred*>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.convert.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.convert.pass.cpp
index 1808545422498..3b41739590976 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.convert.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/ctor.convert.pass.cpp
@@ -131,8 +131,8 @@ constexpr bool test() {
struct Rng : std::ranges::view_base {
constexpr int* begin() const { return nullptr; }
- constexpr Sent end() { return Sent{0}; }
- constexpr MoveOnlyConvert end() const { return MoveOnlyConvert(Sent{0}); }
+ constexpr Sent end() { return Sent{5}; }
+ constexpr MoveOnlyConvert end() const { return MoveOnlyConvert(Sent{7}); }
};
using R = std::ranges::take_while_view<Rng, TestPred>;
@@ -143,7 +143,7 @@ constexpr bool test() {
R r{Rng{}, TestPred{}};
Sentinel s1 = r.end();
ConstSentinel s2 = s1;
- assert(s2.base().i == 0);
+ assert(s2.base().i == 5);
}
return true;
diff --git a/libcxx/test/std/ranges/range.adaptors/range.take/range.take.sentinel/ctor.base.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/range.take.sentinel/ctor.base.compile.pass.cpp
index 9383508165609..55021d79968a3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/range.take.sentinel/ctor.base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/range.take.sentinel/ctor.base.compile.pass.cpp
@@ -12,8 +12,8 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "test_iterators.h"
#include "../types.h"
@@ -21,5 +21,5 @@
using TakeView = std::ranges::take_view<MoveOnlyView>;
using Sentinel = std::ranges::sentinel_t<TakeView>;
-static_assert(!std::is_constructible_v<Sentinel, sentinel_wrapper<int*>>);
-static_assert(!std::is_convertible_v<sentinel_wrapper<int*>, Sentinel>);
+static_assert(!std::constructible_from<Sentinel, sentinel_wrapper<int*>>);
+static_assert(!std::convertible_to<sentinel_wrapper<int*>, Sentinel>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.parent.iter.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.parent.iter.compile.pass.cpp
index 37b6016e439fb..8d59264269711 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.parent.iter.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.parent.iter.compile.pass.cpp
@@ -12,6 +12,7 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "../types.h"
@@ -20,4 +21,4 @@ using TransformView = std::ranges::transform_view<MoveOnlyView, PlusOne>
using TransformViewBaseIter = std::ranges::iterator_t<MoveOnlyView>;
using TransformIter = std::ranges::iterator_t<TransformView>;
-static_assert(!std::is_constructible_v<TransformIter, TransformView&, TransformViewBaseIter>);
+static_assert(!std::constructible_from<TransformIter, TransformView&, TransformViewBaseIter>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/sentinel/ctor.base.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/sentinel/ctor.base.compile.pass.cpp
index b5f134528fef0..869e26e1af90a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/sentinel/ctor.base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/sentinel/ctor.base.compile.pass.cpp
@@ -12,6 +12,7 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include "test_iterators.h"
@@ -21,5 +22,5 @@ using BaseSent = std::ranges::sentinel_t<SizedSentinelView>;
using TransformView = std::ranges::transform_view<SizedSentinelView, PlusOne>;
using TransformSent = std::ranges::sentinel_t<TransformView>;
-static_assert(!std::is_constructible_v<TransformSent, BaseSent>);
-static_assert(!std::is_convertible_v<BaseSent, TransformSent>);
+static_assert(!std::constructible_from<TransformSent, BaseSent>);
+static_assert(!std::convertible_to<BaseSent, TransformSent>);
diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.compile.pass.cpp
index fc3384e191d1d..f40f01a88b158 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.compile.pass.cpp
@@ -12,13 +12,17 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "../types.h"
-static_assert(!std::is_constructible_v<std::ranges::iterator_t<std::ranges::iota_view<int>>, int>);
+using IntIter = std::ranges::iterator_t<std::ranges::iota_view<int>>;
-using Iter = std::ranges::iterator_t<std::ranges::iota_view<SomeInt>>;
-static_assert(!std::is_constructible_v<Iter, SomeInt>);
-static_assert(!std::is_convertible_v<SomeInt, Iter>);
+static_assert(!std::constructible_from<IntIter, int>);
+static_assert(!std::convertible_to<int, IntIter>);
+
+using SomeIntIter = std::ranges::iterator_t<std::ranges::iota_view<SomeInt>>;
+
+static_assert(!std::constructible_from<SomeIntIter, SomeInt>);
+static_assert(!std::convertible_to<SomeInt, SomeIntIter>);
diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.compile.pass.cpp
index b0bcdb6c60ce7..93bb65745f87f 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.compile.pass.cpp
@@ -12,11 +12,12 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
-#include <type_traits>
#include "../types.h"
using Sent = std::ranges::sentinel_t<std::ranges::iota_view<SomeInt, IntSentinelWith<SomeInt>>>;
-static_assert(!std::is_constructible_v<Sent, IntSentinelWith<SomeInt>>);
-static_assert(!std::is_convertible_v<IntSentinelWith<SomeInt>, Sent>);
+
+static_assert(!std::constructible_from<Sent, IntSentinelWith<SomeInt>>);
+static_assert(!std::convertible_to<IntSentinelWith<SomeInt>, Sent>);
diff --git a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.parent.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.parent.compile.pass.cpp
index 04ff9ac24d731..51c92dac50ce2 100644
--- a/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.parent.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.istream.view/iterator/ctor.parent.compile.pass.cpp
@@ -13,9 +13,9 @@
// The constructor is now `private` (exposition-only) per P3059R2.
+#include <concepts>
#include <ranges>
#include <sstream>
-#include <type_traits>
#include "test_macros.h"
More information about the libcxx-commits
mailing list