在下面的代码C++的std ::阵列警告
std::array<int,3> myarray = {10,20,30};
我收到以下编译器警告
warning: missing braces around initializer for ‘std::array<int, 3u>::value_type [3] {aka int [3]}’ [-Wmissing-braces]
为什么?
工具链:(编辑)
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
我们应该*猜测*您正在使用什么工具链? – WhozCraig 2013-02-10 03:48:19
@WhozCraig编辑 – 2013-02-10 03:49:39
谢谢。它的确有所作为。 – WhozCraig 2013-02-10 03:50:28