O'Reilly logo
  • Yuan Peng Chiang thinks this is interesting:

The function expects a Mammal object, so the compiler slices down the Dog object to just the Mammal part.

From

Cover of Sams Teach Yourself C++ in 24 Hours, fifth edition

Note

compiler cast Dog to Mamal?