Replies: 1 comment
-
|
I agree that this is a good feature request, in fact I tried to make this change in 2022. Unfortunately I found a lot of broken code in our internal codebase, but I didn't have time to clean it all up, so I had to put it on the back-burner. By the way, in the latest version of Abseil, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It happened a few times to me already that I had
{ absl::MutexLock(&my_lock); // ... }in my code, wondering why it's broken. This is quite easy to miss! But adding this tag to the
MutexLockconstructor would prevent the issue. Namely, https://en.cppreference.com/w/cpp/language/attributes/nodiscard.html has this note:Beta Was this translation helpful? Give feedback.
All reactions