[libcxx-commits] [libcxx] [libc++] Fix name of is_always_lock_free test which was never being run (PR #106077)

S. B. Tam via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 18 20:22:09 PDT 2024


================
@@ -45,7 +51,8 @@ void check_always_lock_free(std::atomic<T> const& a) {
 
   // In all cases, also sanity-check it based on the implication always-lock-free => lock-free.
   if (is_always_lock_free) {
-    std::same_as<bool> decltype(auto) is_lock_free = a.is_lock_free();
+    auto is_lock_free = a.is_lock_free();
+    ASSERT_SAME_TYPE(decltype(is_always_lock_free), bool const);
----------------
cpplearner wrote:

```suggestion
    ASSERT_SAME_TYPE(decltype(is_lock_free), bool);
```

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


More information about the libcxx-commits mailing list