[libcxx-commits] [libcxx] [libc++] Make `std::lock_guard` available with `_LIBCPP_HAS_NO_THREADS` (PR #98717)
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 16 09:31:54 PDT 2024
================
@@ -14,13 +14,9 @@
#include <mutex>
-int main(int, char**)
-{
- std::mutex m0;
- std::mutex m1;
- std::lock_guard<std::mutex> lg0(m0);
- std::lock_guard<std::mutex> lg(m1);
- lg = lg0;
+class MyMutex;
+int main(int, char**) {
+ static_assert(!std::is_copy_assignable<std::lock_guard<MyMutex> >::value, "");
return 0;
}
----------------
petrhosek wrote:
Done.
https://github.com/llvm/llvm-project/pull/98717
More information about the libcxx-commits
mailing list