============================================ Demonstrating Operation of Compound Object ============================================ U default construction C default construction B default construction D default construction D using U ---------------------- Running testFunction ---------------------- C default construction B default construction D default construction C move construction B move construction D move construction D destruction B destruction C destruction D move assignment B move assignment C move assignment D destruction B destruction C destruction ---------------------------- starting copy construction ---------------------------- C copy construction B copy construction D copy construction ---------------------------- starting move construction ---------------------------- C move construction B move construction D move construction ---------------------------- Demonstrating polymorphism ---------------------------- C default construction B default construction Calling B::g() Calling D::g() ---------------------- leaving main's scope ---------------------- D destruction B destruction C destruction D destruction B destruction C destruction D destruction B destruction C destruction U destruction Press any key to continue . . .