http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59244
Bug ID: 59244 Summary: [c++11] can't specialize template on ref-qualified member function pointer type Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com I believe the following should compile: ``` template<typename T> struct U; template<typename S, typename T> struct U<S (T::*)()> {}; template<typename S, typename T> struct U<S (T::*)() &> {}; template<typename S, typename T> struct U<S (T::*)() &&> {}; ``` g++ 4.8.1 in C++11 mode gives this: ``` test.cpp:9:8: error: redefinition of ‘struct U<S (T::*)()>’ struct U<S (T::*)() &> ^ test.cpp:5:8: error: previous definition of ‘struct U<S (T::*)()>’ struct U<S (T::*)()> ^ test.cpp:13:8: error: redefinition of ‘struct U<S (T::*)()>’ struct U<S (T::*)() &&> ^ test.cpp:5:8: error: previous definition of ‘struct U<S (T::*)()>’ struct U<S (T::*)()> ^ ```