This question asks if const means thread-safe, which Herb Sutter's You don't know const and mutable talk answers well. But what about the opposite direction? If a function is thread-safe, should it thereby be marked const? If not, when should a function be marked const?
Aucun commentaire:
Enregistrer un commentaire