-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
Description
Bugzilla Link | 10622 |
Resolution | FIXED |
Resolved on | Aug 10, 2011 11:52 |
Version | unspecified |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor |
Extended Description
Sorry if this is one of the "know to be missing" items, but there seems to be quiet a bit of support for "= default" already.
Clang complains when compiling
struct foo {
const int first;
constexpr foo(const foo&) = default;
};
void find_or_insert(const foo& __obj) {
foo x(__obj);
}
the error is
path_service.ii:3:13: error: constructor for 'foo' must explicitly initialize the const member 'first'
constexpr foo(const foo&) = default;
^
path_service.ii:2:13: note: declared here
const int first;
^
path_service.ii:6:7: note: implicit default copy constructor for 'foo' first required here
foo x(__obj);
^