simendsjo: > But why would you want to cast away const then? I presume for a situation where you are sure your code is just reading the information and not modifying it, and you need something that is not const.
> assert(i == 10); // i still 10 though.. How is this possible? You have done something that you are not supposed to do. Undefined behaviour means that it generally produces unexpected effects/results :-) Bye, bearophile