https://bugs.llvm.org/show_bug.cgi?id=38203
Bug ID: 38203
Summary: use of deleted function
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
The code is as follow:
struct Z { };
struct A {
operator Z &&() const = delete; // It is deleted.
operator Z();
};
void zip() {
Z &&x = A();
}
clang++ accepts the code, but g++ rejects it:
error: use of deleted function 'A::operator Z&&() const'
Z &&x = A();
^
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs