News for hackers. Stuff that matters.
Re:Copying data is wasteful, mutating data is dangerous by gdxhyrd on Thursday January 09, 2020 @02:07PM (#22004350)
Casting away constness in C++ is something it is virtually never done, and has to be done very explicitly.
Re:Copying data is wasteful, mutating data is dangerous by masklinn on Thursday January 09, 2020 @03:02PM (#22005025)
> https://github.com/search?q=const_cast&type=Code

We must have very different notions of "virtually never": https://github.com/search?q=const_cast&type=Code

> has to be done very explicitly.

That doesn't make it visible to the caller.