[LLVMbugs] [Bug 16285] New: Cannot initialize const reference function argument with braced-init-list
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jun 9 12:09:30 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16285
Bug ID: 16285
Summary: Cannot initialize const reference function argument
with braced-init-list
Product: clang
Version: 3.2
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: vanboxem.ruben at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
This code fails when using Clang 3.2 and current ToT, and using GCC 4.6 and
4.8's libstdc++:
#include <unordered_set>
void lol(const std::unordered_set<double>& yodel = {}) {}
int main()
{
lol();
}
GCC accepts this since 4.7. Also see:
http://stackoverflow.com/questions/6615823/uniform-initializer-used-in-default-argument-to-const-reference
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3139.pdf
--
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/20130609/3f8a6535/attachment.html>
More information about the llvm-bugs
mailing list