aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C
blob: a1cbe52124b595dfd987c6d05f135e0fc1a6e01e (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
// P1094R2
// { dg-do compile { target c++20 } }

inline namespace A::B { // { dg-error "a nested namespace definition cannot be inline" }
  int i;
}

namespace inline C::D { // { dg-error "expected|does not name a type" }
  int i;
}

namespace E::F inline { // { dg-error "expected" }
  int i;
}

namespace inline G { // { dg-error "expected|does not name a type" }
  int i;
}

inline namespace inline H { // { dg-error "expected|does not name a type" }
  int i;
}

inline namespace inline I::J { // { dg-error "expected|does not name a type" }
  int i;
}