https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99501
Bug ID: 99501 Summary: Can't forward declare partial specialization of template with NTTP previously partially specialized Product: gcc Version: 11.0 URL: https://godbolt.org/z/Mhnxrf Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/Mhnxrf. ```C++ template<auto>struct X; template<auto V>requires requires{V.a;}struct X<V>; template<auto V>requires requires{V.b;}struct X<V>; ``` Completed: ```C++ template<auto>struct X{}; template<auto V>requires requires{V.a;}struct X<V>{static constexpr bool v{false};}; template<auto V>requires requires{V.b;}struct X<V>; struct A{int a;}; static_assert(!X<A{}>::v); struct B{int b;}; template<auto V>requires requires{V.b;}struct X<V>{static constexpr bool v{true};}; static_assert(X<B{}>::v); ```