Debian Codegraph @

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

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