Skip to content

Commit cbc4ff6

Browse files
committed
Updated test
1 parent b587330 commit cbc4ff6

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

libcxx/test/std/ranges/range.factories/range.iota.view/indices.pass.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,11 @@
2828
template <typename SizeType>
2929
concept HasIndices = requires(SizeType s) { std::ranges::views::indices(s); };
3030

31-
struct IntegerTypesTest {
32-
template <class T>
33-
constexpr void operator()() {
34-
static_assert(HasIndices<T>);
35-
}
36-
};
37-
3831
struct NotIntegerLike {};
3932

40-
void test_SFIANE() {
33+
void test_SFINAE() {
4134
static_assert(HasIndices<std::size_t>);
42-
types::for_each(types::integer_types(), IntegerTypesTest{});
35+
types::for_each(types::integer_types(), []<typename T> { static_assert(HasIndices<T>); });
4336

4437
// Non-integer-like types should not satisfy HasIndices
4538
static_assert(!HasIndices<bool>);
@@ -97,7 +90,7 @@ constexpr bool test() {
9790
}
9891

9992
int main(int, char**) {
100-
test_SFIANE();
93+
test_SFINAE();
10194

10295
test();
10396
static_assert(test());

0 commit comments

Comments
 (0)