I understand that the function is not allowed to change the state of the object, but I thought I read somewhere that the compiler was allowed to assume that if the function
I doubt it, the function could still call a global function that altered the state of the world and not violate const.