You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a super class and a sub class. In both there is one-one method with the same name but with different parameters. In C++ the inherited method is hidden by the sub class's method with the same name and super class's method cannot be called in a simple way.
Cannot be built:
B* b = new B();
b->a();
Possible solutions
Preferred
B* b = new B();
((A*)b)->a();
Others
B* b = new B();
b->A::a();
B* b = new B();
A* _temp_b = b
_temp_b->a();
Class B: public A
{
...
using A::a;
...
}
B* b = new B();
b->a();
The text was updated successfully, but these errors were encountered:
Initial support is added in #352
The operation FQN is used if the class that defines the operation has a subtype (transitively) that defines an operation with the same name.
Problem
There is a super class and a sub class. In both there is one-one method with the same name but with different parameters. In C++ the inherited method is hidden by the sub class's method with the same name and super class's method cannot be called in a simple way.
Cannot be built:
Possible solutions
The text was updated successfully, but these errors were encountered: