main.cpp:17:17: error: no viable conversion from 'X<int, 3>' to 'int'
: elements {{ std::forward<E>(elements)... }}
^~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:33:6: note: in instantiation of function template specialization 'X<int, 3>::X<X<int, 3> &>' requested here
X3I x2(x0); // boom
^
1 error generated.
The problem is, "x0" isn't const so it is trying to use the templated constructor instead of the copy constructor because of it. You can fix this by doing something like this to make them different:
I had thought of providing an initializer list, but it seemed to go against the grain in many cases. I value consistency more than anything (which is generally believed to be object construction by parenthesis). The same thing irks me about accessing a 2D array obfuscated by the use of operator().