[libcxx-commits] [libcxx] Fix bug in atomic_ref's calculation of lock_free-ness. (PR #93427)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 25 07:03:48 PDT 2024


================
@@ -64,6 +159,17 @@ struct LargeUserAtomicType {
   }
 };
 
+template <template <class TestArg> class TestFunctor>
+struct TestEachLockFreeKnownIntegralType {
+  void operator()() const {
+    TestFunctor<char>()();
+    TestFunctor<short>()();
+    TestFunctor<int>()();
+    TestFunctor<long long>()();
+    TestFunctor<void*>()();
+  }
+};
+
----------------
EricWF wrote:

Hmm, good point.

It probably should be given that I don't think we know `int` or `long long` to always be lock free, so it's wrong.

https://github.com/llvm/llvm-project/pull/93427


More information about the libcxx-commits mailing list