@@ -41,7 +41,7 @@ void test_SFIANE() {
41
41
static_assert (HasIndices<std::size_t >);
42
42
types::for_each (types::integer_types (), IntegerTypesTest{});
43
43
44
- // Not integer-like types should not satisfy HasIndices
44
+ // Non- integer-like types should not satisfy HasIndices
45
45
static_assert (!HasIndices<bool >);
46
46
static_assert (!HasIndices<float >);
47
47
static_assert (!HasIndices<void >);
@@ -52,11 +52,10 @@ void test_SFIANE() {
52
52
constexpr bool test () {
53
53
{
54
54
auto indices_view = std::ranges::views::indices (5 );
55
- assert (indices_view.size () == 5 );
56
-
57
- // Check that the view is a range
58
55
static_assert (std::ranges::range<decltype (indices_view)>);
59
56
57
+ assert (indices_view.size () == 5 );
58
+
60
59
assert (indices_view[0 ] == 0 );
61
60
assert (indices_view[1 ] == 1 );
62
61
assert (indices_view[2 ] == 2 );
@@ -68,11 +67,10 @@ constexpr bool test() {
68
67
std::vector v (5 , 0 );
69
68
70
69
auto indices_view = std::ranges::views::indices (std::ranges::size (v));
71
- assert (indices_view.size () == 5 );
72
-
73
- // Check that the view is a range
74
70
static_assert (std::ranges::range<decltype (indices_view)>);
75
71
72
+ assert (indices_view.size () == 5 );
73
+
76
74
assert (indices_view[0 ] == 0 );
77
75
assert (indices_view[1 ] == 1 );
78
76
assert (indices_view[2 ] == 2 );
@@ -83,13 +81,11 @@ constexpr bool test() {
83
81
{
84
82
std::vector v (5 , SomeInt{});
85
83
86
- // Check that the indices view works as expected
87
84
auto indices_view = std::ranges::views::indices (std::ranges::size (v));
88
- assert (indices_view.size () == 5 );
89
-
90
- // Check that the view is a range
91
85
static_assert (std::ranges::range<decltype (indices_view)>);
92
86
87
+ assert (indices_view.size () == 5 );
88
+
93
89
assert (indices_view[0 ] == 0 );
94
90
assert (indices_view[1 ] == 1 );
95
91
assert (indices_view[2 ] == 2 );
0 commit comments