Skip to content
Snippets Groups Projects
Commit d79967db authored by patavirt's avatar patavirt
Browse files

array: allow index narrowing

parent 3aa910b7
No related branches found
No related tags found
No related merge requests found
...@@ -410,7 +410,7 @@ public: ...@@ -410,7 +410,7 @@ public:
static_assert(sizeof...(idxs) <= Shape::ndim, static_assert(sizeof...(idxs) <= Shape::ndim,
"number of indices must be smaller than the number of dimensions"); "number of indices must be smaller than the number of dimensions");
const std::array<size_t, Shape::ndim> m{idxs...}; const std::array<size_t, Shape::ndim> m{static_cast<size_t>(idxs)...};
size_t idx = 0; size_t idx = 0;
for (size_t i = 0; i < sizeof...(idxs); ++i) { for (size_t i = 0; i < sizeof...(idxs); ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment