Why does this not compile
#include <vector>
#include <array>
std::array<std::vector<const char*>, 2> s = {
{"abc", "def"},
{"ghi"}
};
but this does
#include <vector>
#include <array>
std::array<std::vector<const char*>, 2> s = {
std::vector{"abc", "def"},
{"ghi"}
};
And if for whatever reason the std::vector
is needed for the first one, why not for the second?