* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / dc8.C
blobe483f3e4eeb124b3c5fedffab193e7611b9aef0d
1 // PR c++/51424
2 // { dg-do compile { target c++11 } }
4 template <class T >
5 struct S
7   S() : S() {}          // { dg-error "delegates to itself" }
8   S(int x) : S(x) {}    // { dg-error "delegates to itself" }
9 };
11 struct B1
13   B1() : B1() {}        // { dg-error "delegates to itself" }
14   B1(int y) : B1(y) {}  // { dg-error "delegates to itself" }
17 struct V1 : virtual B1
19   V1() : B1() {}
20   V1(int x) : B1(x) {}
23 struct B2
25   B2() : B2() {}        // { dg-error "delegates to itself" }
26   B2(int y) : B2(y) {}  // { dg-error "delegates to itself" }
29 struct V2 : virtual B2
31   V2() : V2() {}        // { dg-error "delegates to itself" }
32   V2(int x) : V2(x) {}  // { dg-error "delegates to itself" }
35 struct B3
37   B3() {}
38   B3(int y) {}
41 struct V3 : virtual B3
43   V3() : V3() {}        // { dg-error "delegates to itself" }
44   V3(int x) : V3(x) {}  // { dg-error "delegates to itself" }
47 struct CE1
49   constexpr CE1() : CE1() {}        // { dg-error "delegates to itself" }
50   constexpr CE1(int x) : CE1(x) {}  // { dg-error "delegates to itself" }
53 struct CEB2
55   constexpr CEB2() : CEB2() {}        // { dg-error "delegates to itself" }
56   constexpr CEB2(int x) : CEB2(x) {}  // { dg-error "delegates to itself" }
59 struct CE2 : CEB2
61   constexpr CE2() : CEB2() {}
62   constexpr CE2(int x) : CEB2(x) {}
65 S<int> s1;
66 S<int> s2(1);