News for hackers. Stuff that matters.
Re:Care is needed to use C++ std:optional with non-trivial o... by kllrnohj on Friday January 13, 2023 @09:55AM (#34368532)
In C I don't even have a clue if the copy is even valid at all or if I was supposed to call some bespoke function or use some wacky macro somewhere.

C++ is a strict improvement in that you can at least generally assume the assignment operator produces functional code if it compiles, and types with unusually expensive assignments can opt to prevent the assignment operator from being used at all to make that clear.

There are no comments on this comment yet.