http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51477

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-13 
22:50:55 UTC ---
I can't reproduce the behaviour on recent builds from trunk.  E.g, on
r182308 I am getting:

$ cat -n test-PR51475.cc 
     1    #include <initializer_list>
     2    
     3    struct A
     4    {
     5        A(int*);
     6    };
     7    
     8    struct B
     9    {
    10        const std::initializer_list<A>& x;
    11    };
    12    
    13    B b = {{1}};
$ ./cc1plus -quiet -std=c++11 -I ../../libstdc++-v3/libsupc++/ 
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/
test-PR51477.cc
test-PR51477.cc:13:11: erreur: invalid conversion from ‘<brace-enclosed
initializer list>’ to ‘const std::initializer_list<A>&’ [-fpermissive]
test-PR51477.cc:13:11: erreur: cannot convert ‘{1}’ from type ‘<brace-enclosed
initializer list>’ to type ‘const std::initializer_list<A>&’
$

Reply via email to