Is the absence of
std::array<T,size>::array(const T& value);
an oversight? It seems mighty useful to me, and dynamic containers (like std::vector
) do have a similar constructor.
I am fully aware of
std::array<T,size>::fill(const T& value);
but that is not a constructor, and the memory will be zeroed out first. What if I want all -1
's like this guy?
std::vector
). So since it would always be equivalent toarray(); array.fill();
, omitting the constructor in the first place doesn't hide this fact. – Christian Rau Jul 29 '13 at 12:38