File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
libcxx/test/std/ranges/range.factories/range.iota.view Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 28
28
template <typename SizeType>
29
29
concept HasIndices = requires (SizeType s) { std::ranges::views::indices (s); };
30
30
31
- struct IntegerTypesTest {
32
- template <class T >
33
- constexpr void operator ()() {
34
- static_assert (HasIndices<T>);
35
- }
36
- };
37
-
38
31
struct NotIntegerLike {};
39
32
40
- void test_SFIANE () {
33
+ void test_SFINAE () {
41
34
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>); });
43
36
44
37
// Non-integer-like types should not satisfy HasIndices
45
38
static_assert (!HasIndices<bool >);
@@ -97,7 +90,7 @@ constexpr bool test() {
97
90
}
98
91
99
92
int main (int , char **) {
100
- test_SFIANE ();
93
+ test_SFINAE ();
101
94
102
95
test ();
103
96
static_assert (test ());
You can’t perform that action at this time.
0 commit comments