Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很多时候,问题在于编译器版本。以下代码适用于 GCC 4.7.1:
#include <array> struct X{ std::array<int, 2> a; X() : a{{1,2}} {} }; int main(){ X x; }
活生生的例子。