Comment by dchest
Comment by dchest a day ago
Ha, "Don't Forget to Flush" https://www.youtube.com/watch?v=f30PceqQWko
Comment by dchest a day ago
Ha, "Don't Forget to Flush" https://www.youtube.com/watch?v=f30PceqQWko
It's a bug to flush (fallible operation) in a destructor (infallible operation).
I know you've thought carefully about these issues, but still it can't be that simple, can it? Closing a file or a socket is a fallible operation too.
That's why I like RAII.