File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ namespace nda {
22
22
shape_of_rank<2 > s;
23
23
dense_array_ref<int , 2 > ref;
24
24
dense_array<int , 3 > a;
25
+ const dense_array<int , 3 > const_a;
25
26
26
27
void range_range_bad_copy_construct () {
27
28
fixed_range<3 > x;
@@ -104,6 +105,13 @@ void array_ref_at_too_few_indices() {
104
105
ref (0 );
105
106
}
106
107
108
+ void array_ref_for_each_value_bad_type () {
109
+ ref.for_each_value ([&](float & i) { i = 0 ; });
110
+ }
111
+
112
+ void array_ref_for_each_value_too_many_args () {
113
+ ref.for_each_value ([&](int i, int j) { });
114
+ }
107
115
108
116
void array_at_too_many_indices () {
109
117
a (0 , 1 , 2 , 3 );
@@ -113,6 +121,10 @@ void array_at_too_few_indices() {
113
121
a (0 , 1 );
114
122
}
115
123
124
+ void array_for_each_value_non_const () {
125
+ const_a.for_each_value ([&](int & i) { i = 0 ; });
126
+ }
127
+
116
128
117
129
void copy_different_rank () {
118
130
copy (a, ref);
You can’t perform that action at this time.
0 commit comments