http://llvm.org/bugs/show_bug.cgi?id=14012
Bug #: 14012
Summary: Cannot uniformly initialize empty sets.
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This code:
#include <set>
std::set<std::set<int>> y{{}};
Compiles on gcc 4.7.2, but clang gives out this error:
bug.cc:2:27: error: chosen constructor is explicit in copy-initialization
std::set<std::set<int>> y{{}};
^~
/usr/include/c++/v1/set:378:14: note: constructor declared here
explicit set(const value_compare& __comp = value_compare())
The fact that constructor is explicit should not matter when it's called with
no parameters, no?
This also fails:
std::set<int> x = {};
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs