https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93001
Bug ID: 93001
Summary: bogus is private within this context error with scoped
enum
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
class S {
using T = int;
enum class E : T;
};
enum class S::E : S::T { X };
gives
pr.C:6:22: error: ‘using T = int’ is private within this context
6 | enum class S::E : S::T { X };
| ^
pr.C:2:9: note: declared private here
2 | using T = int;
| ^
but since S::E is a member of class S, this is valid.