#include <mutex> #include <shared_mutex> struct foobar { int foo; std::shared_mutex foo_mtx; int bar; std::shared_mutex bar_mtx; }; int main() { foobar xyz; { std::shared_lock shared_foo_lock(xyz.foo_mtx, std::defer_lock); std::shared_lock shared_bar_lock(xyz.bar_mtx, std::defer_lock); std::scoped_lock shared_multi_lock(shared_foo_lock, shared_bar_lock); } } Severity: warning Line: 20 Summary: CWE: 667 The lock is ineffective because the mutex is locked at the same scope as the mutex itself. It looks...
#include <mutex> #include <shared_mutex> struct foobar { int foo; std::shared_mutex foo_mtx; int bar; std::shared_mutex bar_mtx; }; int main() { foobar xyz; { std::shared_lock shared_foo_lock(xyz.foo_mtx, std::defer_lock); std::shared_lock shared_bar_lock(xyz.bar_mtx, std::defer_lock); std::scoped_lock shared_multi_lock(shared_foo_lock, shared_bar_lock); } } Severity: warning Line: 19 Summary: CWE: 667 The lock is ineffective because the mutex is locked at the same scope as the mutex itself. It looks...
#include <mutex> #include <shared_mutex> struct foobar { int foo; std::shared_mutex foo_mtx; int bar; std::shared_mutex bar_mtx; }; int main() { foobar xyz; { std::shared_lock shared_foo_lock(xyz.foo_mtx, std::defer_lock); std::shared_lock shared_bar_lock(xyz.bar_mtx, std::defer_lock); std::scoped_lock shared_multi_lock(shared_foo_lock, shared_bar_lock); } } Severity: warning Line: 19 Summary: CWE: 667 The lock is ineffective because the mutex is locked at the same scope as the mutex itself. It looks...
#include <mutex> #include <shared_mutex> struct foobar { int foo; std::shared_mutex foo_mtx; int bar; std::shared_mutex bar_mtx; }; int main() { foobar xyz; std::shared_lock shared_foo_lock(xyz.foo_mtx, std::defer_lock); std::shared_lock shared_bar_lock(xyz.bar_mtx, std::defer_lock); std::scoped_lock shared_multi_lock(shared_foo_lock, shared_bar_lock); } Severity: warning Line: 19 Summary: CWE: 667 The lock is ineffective because the mutex is locked at the same scope as the mutex itself. It looks...
[syntaxerror.cpp:1] (error) syntax error: operator [syntaxError] template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; }; void main() { }
[syntaxerror.cpp:1] (error) syntax error: operator [syntaxError] template<class... ts=""> struct overloaded : Ts... { using Ts::operator()...; }; void main() { }</class...>
[syntaxerror.cpp:1] (error) syntax error: operator [syntaxError] template<class... ts=""> struct overloaded : Ts... { using Ts::operator()...; }; void main() { }</class...>