Throw an error if calling non-const methods on const objects.
Illegal to pass const pointers into non-const parameters.