Debian Codegraph @

gcc/testsuite/g++.dg/ext/attr-unavailable-11.C

raw
1 // PR c++/104682
2 // { dg-do compile { target c++11 } }
3
4 template<typename>
5 struct S {
6 enum B {
7 A
8 } __attribute__((unavailable)) ;
9 };
10
11 struct S2 {
12 enum B {
13 A
14 } __attribute__((unavailable));
15 };
16
17 void
18 g ()
19 {
20 S<int>::B a1; // { dg-error "is unavailable" }
21 S2::B a2; // { dg-error "is unavailable" }
22 }