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: unassig...@gcc.gnu.org
        ReportedBy: marcus-y...@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.

Reply via email to