In some example code I see the following with a const:
const std::lock_guard<std::mutex> lock( mux );
In some other examples, no const.
Any technical or semantic difference? Does the const one somehow signal something interesting to the reader? For instance is it intended to remind them that nothing further can happen to lock?
Aucun commentaire:
Enregistrer un commentaire