Eigen::array and std::array have inconsistent constructors.
Summary
In unsupported/Eigen/CXX11/src/util/EmulateArray.h
, we define an Eigen::array
class. If std::array
exists (or not explicitly disabled), then Eigen::array
is an alias to it. Otherwise, we define our own implementation.
The issue is that for the custom implementation, we define constructors
array(const T& v);
array(const T& v1, const T& v2);
...
array(const T& v1, ..., const T& v8);
but std::array
has no such constructors. This leads to an inconsistency in usage.
Environment
- All
Minimal Example
https://godbolt.org/z/79YzdrKfq
What is the current bug behavior?
The above example compiles if we explicitly disable std::array and call the two-element constructor. It fails to compile otherwise.
What is the expected correct behavior?
Usage should be consistent.