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 2828template <typename SizeType>
2929concept 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-
3831struct 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
9992int main (int , char **) {
100- test_SFIANE ();
93+ test_SFINAE ();
10194
10295 test ();
10396 static_assert (test ());
You can’t perform that action at this time.
0 commit comments