public class PrivateOverride { System.out.println("PrivateOverride f()"); public static void main(String[] args) { po.d();// PrivateOverride f()
PrivateOverride poD = new DerivedWith
struct Base2 { };
int x;Base1* b1 = &f; // ok, standard upcastingBase2* b2 = &f; // ok, standard upcasting
// check that the empty base class optimization applies