blob: 3471ad98fad32d29acd1e40bf3426558ad6624f2 [file] [log] [blame]
// Test that we consider base dtors in determining whether
// a derived ctor is deleted even if the ctor is trivial.
// { dg-do compile { target c++11 } }
struct A
{
~A() = delete; // { dg-message "declared here" }
};
struct B: A { }; // { dg-error "deleted" }
extern B eb;
int main()
{
B* b1 = new B; // { dg-error "use of deleted function" }
B* b2 = new B(eb); // { dg-error "use of deleted function" }
}