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

andras.aszodi at csf dot ac.at gcc-bugzilla@gcc.gnu.org
Tue Apr 21 10:48:00 GMT 2015


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

--- Comment #6 from andras.aszodi at csf dot ac.at ---
You were too quick, I was too slow... please re-check :-)

(In reply to Daniel Krügler from comment #4)
> (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