Narrowing in variadic templates
Submitted by Laurent Lemmens
Assigned to Nobody
Link to original bugzilla bug (#1616)
Version: 3.4 (development)
Description
When compiling code with Apple Clang that uses operator()
of some Tensor, I am getting a compilation error "Non-constant-expression cannot be narrowed from type 'unsigned long' to 'std::__1::array<long, 4>::value_type' (aka 'long') in initializer list" on line 199 from Tensor.h.
I have managed to fix this on my machine by replacing line 199 by
199: return this->operator()(array<Index, Numindices>{{firstIndex, secondIndex, static_cast<long>(otherIndices)...}});
but I'm not sure if this is the most general way to go.
Edited by Eigen Bugzilla