repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
testsuite: update mangling
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
using-enum-9.C
blob
3e026057b4088201cee5b1b48281aec90d379654
1
// PR c++/100862
2
// { dg-do compile { target c++20 } }
3
4
enum class fruit { orange, apple };
5
6
struct A {
7
public:
8
using enum fruit;
9
private:
10
};
11
12
struct B {
13
protected:
14
using enum fruit;
15
public:
16
};
17
18
struct C {
19
private:
20
using enum fruit;
21
public:
22
};
23
24
int main() {
25
A::orange, A::apple;
26
B::orange, B::apple; // { dg-error "protected" }
27
C::orange, C::apple; // { dg-error "private" }
28
}