2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / abstract-default1.C
blobe98af766170e84622f73291f781c1d6a171bbc65
1 // PR c++/83796
2 // { dg-do compile { target c++11 } }
4 struct MyAbstractClass
6   virtual int foo() const = 0;
7 };
9 struct TestClass
11   TestClass(const MyAbstractClass& m = {})  // { dg-error "abstract type" }
12   : value_(m.foo()) {}
14   int value_;
17 int TestFunction(const MyAbstractClass& m = {})  // { dg-error "abstract type" }
19   return m.foo();
22 int main()
24   TestClass testInstance;  // { dg-error "abstract type" }
25   TestFunction();  // { dg-error "abstract type" }