[libcxx-commits] [libcxx] [libcxx] p3008 atomic fp min/max (PR #186716)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 21 07:29:01 PDT 2026
================
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// 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, c++20, c++23
+// XFAIL: !has-64-bit-atomics
+
+// floating-point-type fetch_max(floating-point-type, memory_order = memory_order::seq_cst) const noexcept;
+
+#include <atomic>
+#include <cassert>
+#include <concepts>
+#include <type_traits>
+#include <utility>
+
+#include "test_macros.h"
+#include "atomic_helpers.h"
+#include "../atomics.types.operations/atomics.types.operations.req/atomic_fetch_fmax_helper.h"
+
+template <typename T>
+concept has_fetch_max = requires(T t) {
----------------
huixie90 wrote:
`requires (const T t)`
so you don't have to do `decval`
https://github.com/llvm/llvm-project/pull/186716
More information about the libcxx-commits
mailing list