Debian Codegraph @

gcc/testsuite/g++.dg/init/ctor4-1.C

raw
1 // { dg-do compile }
2
3 class foo {
4 public:
5 foo();
6 };
7
8 class bar: public foo { // { dg-error "uninitialized" }
9 // { dg-message "implicitly deleted" "" { target c++11 } .-1 }
10 private:
11 int const a; // { dg-message "should be initialized" }
12 };
13
14 foo::foo() {
15 }
16
17 int main(int argc, char **argv)
18 {
19 bar x; // { dg-error "deleted" "" { target c++11 } }
20 // { dg-message "synthesized" "" { target { ! c++11 } } .-1 }
21 }