6 ms·
Dude, the stealing etc was clearly tongue in cheek. It seems like the example I picked was a bit unfortunate in the following sense: a couple of people have al
by quicknir 11y ago
Dude, the stealing etc was clearly tongue in cheek.
It seems like the example I picked was a bit unfortunate in the following sense: a couple of people have already misinterpreted the point of the article to be that foo still had content after I moved its string (I won't use stole anymore, seems like a touchy subject).
That's not the point, the point is that the invariants are maintained, which is the requirement for a valid state. I could have reset m_set at the same time as I set m_cached to false, it would still be just as correct.
Edit: I have modified the post slightly so that it's a bit clearer that what I'm after is a valid state for foo, not to maintain the specific things that were inserted.