我试图通过初始化程序列表初始化2D std :: array但是编译器告诉我初始化程序太多了.
例如:
std::array<std::array<int, 2>, 2> shape = { {1, 1},
{1, 1} };
Run Code Online (Sandbox Code Playgroud)
编译错误:错误:初始化程序太多 ‘std::array<std::array<int, 2ul>, 2ul>’
但显然没有太多.难道我做错了什么?