[libcxx-commits] [libcxx] [libc++] Implement P0493R5: Atomic minimum/maximum (PR #180333)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 7 09:23:25 PST 2026
================
@@ -0,0 +1,55 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+// XFAIL: !has-64-bit-atomics
+
+// <atomic>
+
+// template<class T>
+// T
+// atomic_fetch_max(volatile atomic<T>*, atomic<T>::value_type) noexcept;
+//
+// template<class T>
+// T
+// atomic_fetch_max(atomic<T>*, atomic<T>::value_type) noexcept;
----------------
H-G-Hristov wrote:
```suggestion
// template<class T>
// T atomic_fetch_max(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
// template<class T>
// constexpr T atomic_fetch_max(atomic<T>*, typename atomic<T>::value_type) noexcept;
```
The formatting of the synopsis looks odd. Can you copy those from the standard:
https://wg21.link/atomics.syn#header:%3catomic%3e
https://github.com/llvm/llvm-project/pull/180333
More information about the libcxx-commits
mailing list