http://llvm.org/bugs/show_bug.cgi?id=10622
Summary: invalid defaulted copy constructor if a member is
const
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
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);
^
--
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