1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// PR c++/38232 class base { public: base(); virtual ~base(); private: int& int_ref; // initialized by base ctor, not visible here }; class derived : public base { }; base *make_derived() { return new derived(); }