Deduce container size from initialization list (CWG 1591) What’s the right way?
I have a class Vec<C>
that works as below, and I need to know a way to write the constructor and/or deduction guide such that a braced-enclosed initialization list deduces C
as std::array<T,N>
. It works with std::vector of course, since the size doesn’t need to be known.