Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I interpreted the author saying "thread-compatible" to mean "accessor beware". Surprisingly in some cases, in C++ it's unsafe for multiple threads to even call const member functions on the same object, for example when the const method modifies a `mutable` field. One way this could happen is when a "const" method lazily computes a value and stores it in a field.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: