1 // P1094R2
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wpedantic" }
4
5 namespace A::inline B::C { // { dg-warning "nested inline namespace definitions only" "" { target c++17_down } }
6 // { dg-warning "nested namespace definitions only available" "" { target c++14_down } .-1 }
7 int i;
8 }
9
10 namespace D::E::inline F { // { dg-warning "nested inline namespace definitions only" "" { target c++17_down } }
11 // { dg-warning "nested namespace definitions only available" "" { target c++14_down } .-1 }
12 int j;
13 }
14
15 inline namespace X {
16 int x;
17 }
18
19 // Make sure the namespaces are marked inline.
20 void
g()21 g ()
22 {
23 A::B::C::i++;
24 A::C::i++;
25 D::E::j++;
26 D::E::F::j++;
27 X::x++;
28 x++;
29 }
30