[LLVMbugs] [Bug 15716] Clang doen't init map with initializer_list
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 10 18:42:14 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15716
Marshall Clow (home) <mclow.lists at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Marshall Clow (home) <mclow.lists at gmail.com> ---
This code is ill-formed.
Section 18.5 [dcl.init] in the standard covers declarations, and paragraph 17
talks about the semantics of direct initialization (which is what this is).
It goes through a bunch of circumstances (none of which apply here) and gets
down to bullet #5, which says:
* Otherwise, if the destination type is an array, the program is ill-formed.
A simpler case would be:
std::pair<int, int[2]> p { 0, { 0, 0 }};
which both gcc and clang reject.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131211/d9833458/attachment.html>
More information about the llvm-bugs
mailing list