http://llvm.org/bugs/show_bug.cgi?id=10811
Summary: Terrible error on implicitly deleted default
constructor in C++0x mode
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
$ cat test.cc
struct hash_int {
int operator()(int i);
};
class Hasher {
const hash_int hash_;
};
void foo() {
Hasher h;
}
$ clang++ -std=c++0x -c test.cc
test.cc:10:12: error: call to deleted constructor of 'Hasher'
Hasher h;
^
test.cc:5:7: note: function has been explicitly marked deleted here
class Hasher {
^
1 error generated.
--------
The C++98 error does a better job:
$ clang++ -c test.cc
test.cc:5:7: error: implicit default constructor for 'Hasher' must explicitly
initialize the const member 'hash_'
class Hasher {
^
test.cc:6:20: note: 'hash_' declared here
const hash_int hash_;
^
test.cc:10:12: note: implicit default constructor for 'Hasher' first required
here
Hasher h;
^
1 error generated.
--
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