If I remember correctly, you are looking at the result of undefined behaviour: that of trying to modify something that is really const.