[libcxx-commits] [libcxx] [libc++] Implement C++20 atomic_ref (PR #76647)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 5 11:30:45 PST 2024
================
@@ -0,0 +1,48 @@
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+
+// T load(memory_order = memory_order::seq_cst) const noexcept;
+
+#include <atomic>
+#include <cassert>
+#include <type_traits>
+
+#include "test_macros.h"
+
+template <typename T>
----------------
ldionne wrote:
@huixie90 A few months ago you refactored the `atomic` tests for float to increase our coverage by a lot. Do you know if there are tests for non-floating-point atomics too, or did we never get around to doing those?
I am wondering whether
- it would make sense to try to share some code for testing atomics, or
- we should duplicate the testing code for `atomic_ref`, or
- the current amount of testing (API only) is sufficient
https://github.com/llvm/llvm-project/pull/76647
More information about the libcxx-commits
mailing list