4 ms·
copy elements between logically compatible containers but ones whose types are differing in layers of constness. Or if you to, say, move a reference all the way
by CountSessine 11y ago
copy elements between logically compatible containers but ones whose types are differing in layers of constness. Or if you to, say, move a reference all the way down into a pointer (or vice versa) to interop with C or other legacy code.
Or any of several other things, including some truly odd possibilities using operator and function overloading.
And this is 'const''s fault? Others have asked - can you provide an example? Because what you're describing sounds like it's going to be a hot mess, const or no const.
I don't really think that const can make bad data representation any worse than it already is.