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++/53494] New: initializer lists in array type


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

             Bug #: 53494
           Summary: initializer lists in array type
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marcus-yass@ihug.co.nz


Created attachment 27502
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27502
preprocessed source for failed compile

g++-4.7 -std=c++11 1.cpp -o e1

1.cpp:
#include <iostream>
#include <utility>
#include <array>
using namespace std;

array<pair<string, unsigned> const, 1> const matchSynonyms{ {"smile",1} };

int main(int argc, char **argv){
    cout<<"success"<<endl;
}

leads to output:

"
â
/home/mako/programming/cing/1.cpp:6: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccTX9zYB.out file, please attach this to
your bugreport.
"


I also get problems when I try to use a vector instead of a pair, but the
errors are a lot longer and confusing and it's harder to rule out user error.


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