¿Por qué la advertencia de clang++ "sugiere llaves alrededor de la inicialización del subobjeto [- Wmissing-llaves]"?


Tengo este código:

#include <array>

int main(int, char **argv)
{
   std::array<int, 3> a = {1,2,3};
}

Esto compila bien (- std = c++11), pero si incluyes-Wall da esta advertencia que no entiendo:

clang_pp_error.cpp:5:28: warning: suggest braces around initialization of subobject [-Wmissing-braces]
   std::array<int, 3> a = {1,2,3};
                           ^~~~~
                           {    }
 30
Author: Scooter, 2015-07-22

2 answers

 14
Author: FrankHB,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 12:10:29
 13
Author: Sohail Si,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 11:47:19