News for hackers. Stuff that matters.
Re:Please restore our registers when you’re done with them by brucedawson on Tuesday November 22, 2022 @07:41PM (#33713593)
I was wondering if anybody was going to point that out. It did occur to me that the CHECK was not technically valid due to that exact concern, but given that we control the compiler and the C++ library implementation and given that it's just debugging code (albeit debugging code that we ship to users) I'm fine with it.

In other words, I guess you shouldn't oughta do that generally, but I was fine with it being used there, and it did its job.

Re:Please restore our registers when you’re done with them by brucedawson on Tuesday November 22, 2022 @11:31PM (#33715189)
It appears that the question of what is valid on a moved-from object is tricky. Here is one discussion: https://stackoverflow.com/questions/7027523/what-can-i-do-wi... FWIW, here is the move operator for the type of the object in question: https://source.chromium.org/chromium/chromium/src/+/main:bas...
Re:Please restore our registers when you’re done with them by account42 on Wednesday November 23, 2022 @06:11AM (#33717755)
Note that the linked discussion is about the standard library. For your own types you can make whatever guarantees you want - ultimately as far as the language is concerned, moves are a function call like any other.