You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was done because the old impl of iota() used to be non-convertible, but
there's no reason to handle this differently from other exprs.
* ra/expr (Cell): As stated.
ra::Small<ra::Big<int, 1>, 1> d = { {1, 2, 3} }; // ok
199
199
tr.test_eq(ra::iota(3, 1), d(0));
200
200
201
-
//requires that x NOT be convertible to int, but expressions generally are convertible to their val type.
202
-
// his is hacked away in Cell's conversion operator. FIXME probably not worth it.
203
-
auto x = ra::iota(3, 1);
204
-
ra::Small<ra::Big<int, 1>, 1> f = { {x} }; //ok; broken with { x }
205
-
tr.test_eq(ra::iota(3, 1), f(0));
201
+
//these fail because x/w is convertible to int. This used not to be the case for old Ptr / iota (so the 1st one worked), but if anything, it is the second that shouldn't be convertible, because the size is static and we exclude size_s!=1 from convertibility (maybe FIXME).
202
+
203
+
//auto x = ra::iota(3, 1);
204
+
//ra::Small<ra::Big<int, 1>, 1> f = { {x} }; // broken with { x }, rt error with { {x} }
205
+
//tr.test_eq(ra::iota(3, 1), f(0));
206
206
207
-
// fails for the same reason.
208
207
// ra::Small<int, 3> w = { 1, 2, 3 };
209
208
// ra::Small<ra::Big<int, 1>, 1> e = { {w} }; // broken with { w }, ct error with { {w} }
0 commit comments