3 ms·
When you are using the function, ye. Not when you are writing it. And if you someday want to change a const method to non-const you could have a cascading const
by rightbyte 3y ago
When you are using the function, ye. Not when you are writing it. And if you someday want to change a const method to non-const you could have a cascading constness change all over the place.
- protomolecule 3y agoBut usually functions are used more than once. "cascading constness change" Which is good because invoking code may rely on function being read-only.