[LLVMbugs] [Bug 12968] New: invalid error: initialization of non-aggregate type 'S' with an initializer list

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 27 13:20:14 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12968

             Bug #: 12968
           Summary: invalid error: initialization of non-aggregate type
                    'S' with an initializer list
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: roman at binarylife.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat test.cpp 
#include <initializer_list>
struct S { S(std::initializer_list<int>); };
S a={0,1,2};
S b[]={ {0,1,2} };

$ clang++ -std=c++11 -c test.cpp
test.cpp:4:9: error: initialization of non-aggregate type 'S' with an
initializer list
S b[]={ {0,1,2} };
        ^~~~~~~
1 error generated.

$ clang++ --version
clang version 3.2 (trunk 157514)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list