const Functions
Let’s learn about const functions and their characteristics.
We'll cover the following...
Introduction
Should we declare a member function as const
whenever possible?
Yes, we should! It clarifies design intent, improves readability, and allows the compiler to catch more errors. We might even benefit from some optimizations sometimes.
const
Functions
First of all, what is a const
function?
A ...