http://llvm.org/bugs/show_bug.cgi?id=12482
Bug #: 12482
Summary: Copy constructors of types with members with rvalue
references
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
I don't know exactly whether this is a bug or not, bug g++ accepts it, and I
feel that clang++ should to. Currently, clang rejects this:
struct bar {};
struct tuple {
struct entry { bar&& member; };
entry members;
tuple() : members { bar() } {}
tuple(const tuple& other) = default;
};
int main()
{
tuple t;
}
with errors:
% clang++ -std=c++11 -pedantic -ofoo baz.cpp && ./foo
baz.cpp:10:2: error: the parameter for this
explicitly-defaulted copy constructor is const, but a
member or base requires it to be non-const
tuple(const tuple& other) = default;
^
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