https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86183
Bug ID: 86183 Summary: Scoped enumeration instantiated even if not required Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- gcc produces errors when compiling the following code: template<typename T> struct A { enum class B { X = T::value }; }; int main() { A<int> a; } A previous version of clang++ also produces errors when compiling the above code, but it was fixed in https://bugs.llvm.org/show_bug.cgi?id=10044 Shall gcc also fix the problem?