This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37896] standard_layout: array direct and copy initialization issues
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2008 23:59:00 -0000
- Subject: [Bug c++/37896] standard_layout: array direct and copy initialization issues
- References: <bug-37896-365@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jason at gcc dot gnu dot org 2008-12-02 23:59 -------
t21 is invalid because you create a standard_layout_base from each element and
then copy the resulting temporary into the array. With the fix I just checked
in you can remove the initializer_list constructor and write
test_type t21[4] = { {1}, {2}, {3}, {4} };
and it will work.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37896