http://llvm.org/bugs/show_bug.cgi?id=7245
Summary: Should not require copy constructor when binding
rvalue to reference
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Specifically,
struct NonCopyable {
NonCopyable();
private:
NonCopyable(const NonCopyable&);
};
void foo(const NonCopyable&);
void bar() {
foo(NonCopyable());
}
should compile. gcc used to complain about this, but stopped in gcc-4.3 because
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#391 convinced them
it was a mistake in C++03 (http://gcc.gnu.org/PR44313). Comeau's online compile
defaults to allowing it, but gives an error if you disable C++0x extensions.
Clang's c++0x mode allows it. And, of course, it's a silly and inconvenient
restriction.
--
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