Debian Codegraph @

gcc/testsuite/g++.dg/modules/class-10_b.C

raw
1 // { dg-additional-options "-fmodules-ts -Wno-pedantic" }
2 // Test bits and pieces of merging information
3 // from class defs into forward declarations
4
5 struct Align;
6 struct Final;
7 struct NeedsConstructing;
8
9 import "class-10_a.H";
10
11 static_assert(alignof(Align) == 16);
12
13 struct TestFinal : Final {}; // { dg-error "cannot derive" }
14
15 struct TestNeedsConstructing {
16 struct {
17 NeedsConstructing a; // { dg-error "with constructor not allowed in anonymous aggregate" }
18 };
19 };