https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232
Bug ID: 103232 Summary: scoped template specalization is not supported (not with C+17 nor C++20) Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dl.soluz at gmx dot net Target Milestone: --- C++17 allows scoped template specalization - clang 7+ and VStudio 2017/2019 allow it - gcc 11.2 and trunk are not able to compile the sample ---------- enum class Type{ Int, Float }; struct Mapper { template<typename Type> struct type_to_enum{}; template<> struct type_to_enum<int>{ static constexpr auto value = Type::Int; }; template <> struct type_to_enum<float> { static constexpr auto value = Type::Float; }; }; ---------