This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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}; 
> };
> //------------------------------
> 
> ?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]