-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11duplicateResolved as duplicateResolved as duplicate
Description
| Bugzilla Link | 10811 |
| Resolution | DUPLICATE |
| Resolved on | Oct 10, 2011 14:24 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@zygoloid |
Extended Description
$ 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.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++11duplicateResolved as duplicateResolved as duplicate