template std::array to_array(const V& v) { assert(v.size() == N); std::array d; std::copy(v.begin(), v.end(), d.data()); return d; }