http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58993
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2013-11-05 Blocks| |59002 Summary|failure to access pointer |incorrectly accept access |to protected member method |of protected member method |in base from derived class |from derived class template |specialization | Ever confirmed|0 |1 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced test, where the base member is private, but the primary template can still access it class base { private: int foo() { } }; template <typename T> struct bar : public base { void test() { &base::foo; // should be rejected } }; template <> struct bar<void> : public base { void test() { // &base::foo; // correctly rejected } }; int main() { bar<int>().test(); bar<void>().test(); }