Skip to content

Commit 104c929

Browse files
committed
ci
1 parent 5c0e469 commit 104c929

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

libcxx/test/std/containers/container.adaptors/flat.multiset/flat.multiset.modifiers/insert_range.pass.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,17 @@ void test() {
8686
MoveOnly expected[] = {1, 1, 3, 4, 5};
8787
assert(std::ranges::equal(m, expected));
8888
}
89-
#ifdef _LIBCPP_HAS_LOCALIZATION
89+
#if _LIBCPP_HAS_LOCALIZATION
9090
{
9191
// https://github.com/llvm/llvm-project/issues/136656
9292
MinSequenceContainer<int> v;
9393
std::flat_multiset s(v);
9494
std::istringstream ints("0 1 1 0");
9595
auto r = std::ranges::subrange(std::istream_iterator<int>(ints), std::istream_iterator<int>()) |
9696
std::views::transform([](int i) { return i * i; });
97+
static_assert(
98+
![](auto& t) { return requires { t.insert_range(r); }; }(v),
99+
"This test is to test the case where the underlying container does not provide insert_range");
97100
s.insert_range(r);
98101
}
99102
#endif

libcxx/test/std/containers/container.adaptors/flat.set/flat.set.modifiers/insert_range.pass.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,17 @@ void test() {
9797
MoveOnly expected[] = {1, 3, 4, 5};
9898
assert(std::ranges::equal(m, expected));
9999
}
100-
#ifdef _LIBCPP_HAS_LOCALIZATION
100+
#if _LIBCPP_HAS_LOCALIZATION
101101
{
102102
// https://github.com/llvm/llvm-project/issues/136656
103103
MinSequenceContainer<int> v;
104104
std::flat_set s(v);
105105
std::istringstream ints("0 1 1 0");
106106
auto r = std::ranges::subrange(std::istream_iterator<int>(ints), std::istream_iterator<int>()) |
107107
std::views::transform([](int i) { return i * i; });
108+
static_assert(
109+
![](auto& t) { return requires { t.insert_range(r); }; }(v),
110+
"This test is to test the case where the underlying container does not provide insert_range");
108111
s.insert_range(r);
109112
}
110113
#endif

0 commit comments

Comments
 (0)