Community
Participate
Working Groups
In the following code: template <typename> class A; template <typename T> class A<void (T::*)()> { }; template <typename T> class A<void (T::*)() const> { }; struct S {}; int main() { A<void (S::*)()> m; // ERROR HERE: "'A<void (S::*)()>' is ambiguous" } GCC compiles the code fine and chooses the non-const specialization.
Thanks, added testcase and fix.