constructsatemporaryshared_ptr,thencallsoperator->)static_cast<DerivedClass*>(ptr_to_base.get())->f();//alsoOK//(directcast