1 // RUN: %clang_cc1 -std=c++1z -verify %s
2
3 // no objects of an abstract class can be created except as subobjects of a
4 // class derived from it
5
6 struct A {
AA7 A() {}
AA8 A(int) : A() {} // ok
9
10 virtual void f() = 0; // expected-note 1+{{unimplemented}}
11 };
12
13 void f(A &&a);
14
g()15 void g() {
16 f({}); // expected-error {{abstract class}}
17 f({0}); // expected-error {{abstract class}}
18 f(0); // expected-error {{abstract class}}
19 }
20
21 struct B : A {
BB22 B() : A() {} // ok
23 };
24