Quantcast
Channel: c++ std::array warning - Stack Overflow
Viewing all articles
Browse latest Browse all 3

c++ std::array warning

$
0
0

On the following code

std::array<int,3> myarray = {10,20,30};

I am receiving the following compiler warning

warning: missing braces around initializer for ‘std::array<int, 3u>::value_type [3] {aka int [3]}’ [-Wmissing-braces]

Why ?

toolchain: (edit)

g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3Copyright (C) 2011 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>