Cannot use protected member of parent class in std :: bind

I have a class Aand B:

class A
{
protected:
    void someFunc() {};
};

class B : public A
{
public:
    B()
    {
         auto a = std::bind(&A::someFunc, this);
    }
};

Why can't I use bindfor a protected method someFunc? It should be available as I am bindusing this.

+4
source share

Source: https://habr.com/ru/post/1618113/


All Articles