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