This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71424] New: std::initializer_list<T[N]>
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Jun 2016 19:08:31 +0000
- Subject: [Bug c++/71424] New: std::initializer_list<T[N]>
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71424
Bug ID: 71424
Summary: std::initializer_list<T[N]>
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
Target Milestone: ---
This was posted by Peter Dimov in c++std-core-22683, and doesn't seem to have
found its way to our bugzilla.
#include <initializer_list>
void f( std::initializer_list<double[2]> list )
{
}
int main()
{
f( { { 1.0, 2.0 }, { 3.0, 4.0 } } );
}
clang++ and EDG accept it, g++ rejects it with:
array must be initialized with a brace-enclosed initializer
Apparently the error message used to be
could not convert â{{1.0e+0, 2.0e+0}, {3.0e+0, 4.0e+0}}â to
âstd::initializer_list<double [2]>â