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: unassignedclangb...@nondot.org
Reporter: zhong...@pku.org.cn
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
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
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs