www.un.org/spanish/ga/president <代码>struct的初始化需要图书馆,阵列的初始化也需要图书馆。 因此,我需要两个镜子:
std::array<int, 5> a = {{1, 2, 3, 4, 5}};
But most of the example code I have seen only uses one pair of braces:
std::array<int, 5> b = {1, 2, 3, 4, 5};
如何允许这样做,与第一 app相比,它是否有任何好处或缺点?