Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/override6.C

raw
1 // PR c++/120628
2 // { dg-do compile }
3 // { dg-options "" }
4 // { dg-additional-options "-pedantic" { target c++14 } }
5
6 namespace U {
7 struct A {};
8 struct A override = {};
9 }
10 namespace V {
11 template <int N>
12 struct B {};
13 template <int N>
14 struct B<N> override = {}; // { dg-warning "variable templates only available with" "" { target c++11_down } }
15 }
16 struct C {
17 struct D {};
18 static D foo ();
19 struct D override = foo (); // { dg-warning "non-static data member initializers only available with" "" { target c++98_only } }
20 };
21 namespace W {
22 struct E { struct F {}; };
23 struct E::F override = {};
24 }
25 template <int N>
26 struct V::B<N> override = {}; // { dg-warning "variable templates only available with" "" { target c++11_down } }