Is it possible to initialize an array of objects whose members are initialized from another constexpr array of trivial objects. For example I have the following
struct X
{
X(int y): _x(y){}
int _x;
};
struct Z
{
static constexpr std::array<int, 4> arr = {1,6,0,4};
// How does one implement make_array below that constructs
// X[0] from arr[0], X[1] from arr[1], etc.
// Is it even feasible in C++14/17?
std::array<X, arr.size()> xArr = make_array( );
};