We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e758118 commit f5463acCopy full SHA for f5463ac
include/beman/timed_lock_alg/mutex.hpp
@@ -232,8 +232,11 @@ class multi_lock {
232
if (not m_locked) {
233
throw std::system_error(std::make_error_code(std::errc::operation_not_permitted));
234
}
235
- auto unlocker = std::apply([](auto... ms) { return std::scoped_lock(std::adopt_lock, *ms...); }, m_ms);
236
- m_locked = false;
+ // clang doesn't seem to understand that "unlocker" is actually used to unlock all mutexes at the end of the
+ // scope even if one of them throws so mark it as maybe_unused.
237
+ [[maybe_unused]] auto unlocker =
238
+ std::apply([](auto... ms) { return std::scoped_lock(std::adopt_lock, *ms...); }, m_ms);
239
+ m_locked = false;
240
241
242
// Modifiers
0 commit comments