To describe is a little tricky, I think. But I do my best...
Given:
A prog (Prog_A)
A lib (Lib_A) with a class Class_A
And a lib (Lib_B) with (also) a class Class_A and has a member Class_A mClass_A
Both classes Class_A have the function
void Class_A::DoSome(){
...
}
For Class_A in Lib_A then
void Class_A::DoSome(){
std::cout << "LIB_A";
}
For Class_A in Lib_B then
void Class_A::DoSome(){
std::cout << "LIB_B";
}
Prog_A includes Lib_A, Lib_A includes Lib_B. Lib_A and Lib_B is "connected" by Callback's. If I now call mClass_A.DoSome() in Lib_B then it's printing
LIB_A
instead of my expectation 'LIB_B'.
Is this behavior correct, or must I be worried?