[libcxx-commits] [libcxx] [libc++][In progress] Floating Point Atomic (PR #67799)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 2 08:59:19 PDT 2023


================
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// constexpr atomic() noexcept;
+// constexpr atomic(floating-point-type) noexcept;
+
+#include <atomic>
+#include <cassert>
+#include <concepts>
+
+#include "test_macros.h"
+
+template <class T>
+void test() {
+  // constexpr atomic() noexcept;
+  {
+    constexpr std::atomic<T> a = {};
----------------
ldionne wrote:

You're not checking for noexcept-ness! Below too.

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


More information about the libcxx-commits mailing list