Presumably for security. If you could get a pointer to this member and pass it to absolutely anyone without some kind of alarm, this would be risky.
Here's a workaround (others may know better):
class A { public: A() {auto tmp = &A::foo;} protected: void foo() {} }; class B : public A { public: B() {auto tmp = &B::foo;} };
EDIT - Thought you might need to use A :: foo, but you don't even need to. It works without. Cm:
Accessing a method pointer to a protected method?
Hostilefork
source share