Introduction to OOP
Chapter 15: Overloading :
next
previous
audio
real
text
Conversion and Coercisons
When one adds conversions into the mix, resolving overloaded function or method calls can get very complex. Many different types of conversions:
Implicit value changing conversion (such as integer to real)
Implicit conversion that does not change value (pointer to child class converted into pointer to parent)
Explicit conversions (casts)
Conversion operators (C++ and the like)
See text for illustration of the complex rules.
Intro OOP,
Chapter 15
, Slide 10