P
Peter Lee
class Base {
public:
void t1() {}
void t2() {}
void t3() {};
};
class Derived : public Base
{
public:
private:
using Base::t1;
using Base::t3;
};
Derived d;
d.t1(); // error, this is what I want
d.t3(); // error, this is what I want
d.Base::t1(); // ok <== I don't want user call method this way
my question:
I don't want user to call t1(); and t3(); from class Derived
Is there any way?
public:
void t1() {}
void t2() {}
void t3() {};
};
class Derived : public Base
{
public:
private:
using Base::t1;
using Base::t3;
};
Derived d;
d.t1(); // error, this is what I want
d.t3(); // error, this is what I want
d.Base::t1(); // ok <== I don't want user call method this way
my question:
I don't want user to call t1(); and t3(); from class Derived
Is there any way?