On Tuesday, 22 September 2015 at 15:33:40 UTC, Ola Fosheim Grøstad wrote:
On Tuesday, 22 September 2015 at 15:11:55 UTC, Kagamin wrote:
Another C feature you didn't know about: the standard allows to create a mutable pointer to const data and mutate it.

I didn't? Of course I did. In C++ other threads can write to const objects. The function receiving a const objects is not supposed to write to const. Const cast is supposed to be used for calling legacy const interfaces without a const signature.

Of course you didn't. In C you can mutate const object without cast. But it's not an issue because it's not what is usually done and usually const works as expected.

Reply via email to