[Bug c++/65815] std::array initialization with initializer list: a = {x,y,z} incorrectly flagged as syntax error

daniel.kruegler at googlemail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 21 10:46:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65815

--- Comment #4 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to andras.aszodi from comment #3)
> The problem manifests itself if the array is a member variable in a class
> and initialised "inline". Details in my new comment below.

There are no details anywhere. Please keep in mind that a complete code example
is generally required for an issue. So, if I understand you correctly, you have
the following code in mind:

//------------------------------
#include <array>

struct X 
{
  std::array<double, 3> q1 = {1.0, -1.0, 1.0}; 
};
//------------------------------

?


More information about the Gcc-bugs mailing list