| 30 | // https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0493r5.pdf |
| 31 | template <typename T> |
| 32 | inline T atomic_fetch_max(std::atomic<T>& current_max, const T& value) noexcept { |
| 33 | T t = current_max.load(); |
| 34 | while (!current_max.compare_exchange_weak(t, std::max(t, value))); |
| 35 | return t; |
| 36 | } |
| 37 | } // namespace vvl |
| 38 | |
| 39 | namespace syncval { |