const Overloads
Let’s learn about const overloads.
Introduction to const Overloads
It’s possible to overload a function with the const
qualifier. It’s also possible to have a const
and a non-const
overload of the same function.
In such a case, the compiler will choose which overload to call based on whether the calling object itself is const
or not.
const objects call const overloads
Get hands-on with 1400+ tech skills courses.