Y
Hacker News
new
|
ask
|
show
|
jobs
by
slavik81
2471 days ago
I mean that CoW classes like Qt's QStringList do the same data sharing without being immutable.
1 comments
slavik81
2470 days ago
Admittedly, it's pretty easy to accidentally make unnecessary non-const accesses in modern C++. An immutable API would certainly avoid a lot of qAsConst casts.
link