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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs