I know that calling virtual methods from constructors should be avoided. But is following example still such case? I.e. is it OK to call virtual function by qualified name selecting exact override to call?
struct base {
virtual void foo( ) = 0;
};
struct derived : base {
derived( ) {
// IMHO derived's override gets called no matter what, right?
this->derived::foo( );
}
void foo( ) override {
// derived does something
}
};
struct eventual_more_derived : derived {
void foo( ) override {
// eventual_more_derived may do something different
}
};