I have an question to "Constructor should not call a virtual methods" (in C++). Yes I know the problem. The problem is clear. It is described e.g. here
I have a special question. I start with CppDepent do check my project. Now CppDepent warns me, every time I call a virtual function in constructor. No matter if the function is on a base class or not. It warns if it is a virtual function of an other class. (see sample)
The question: Is it a Problem to call a virtual function on a constructor (same destructor) of an class how is not a base class.
class NotABaseClass {
explicit NotABaseClass(){}
virtual void foo_virtual(){};
}
class NotADeriveClass {
explicit NotADeriveClass(){
NotABaseClass notABaseClass;
notABaseClass.foo_virtual();
}
}