https://llvm.org/bugs/show_bug.cgi?id=24260
Bug ID: 24260
Summary: point to the destructor that's private or inaccessible
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Missing note at declaration of private or inaccessible destructor that causes
another type to have no destructor.
$ cat b17589480.cc
class X {
~X(); // private
};
struct Y {
X x;
};
void test() {
Y y;
}
$ clang -std=c++14 b17589480.cc
b17589480.cc:8:5: error: call to implicitly-deleted default constructor of 'Y'
Y y;
^
b17589480.cc:5:5: note: default constructor of 'Y' is implicitly deleted
because
field 'x' has an inaccessible destructor
X x;
^
1 error generated.
Please add a note pointing to ~X() itself. This will especially help for the
case where Y's member isn't just an X but is template typename T.
--
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