Lines Matching defs:fetch_sub
11 // integral-type fetch_sub(integral-type, memory_order = memory_order::seq_cst) const noexcept;
12 // floating-point-type fetch_sub(floating-point-type, memory_order = memory_order::seq_cst) const noexcept;
13 // T* fetch_sub(difference_type, memory_order = memory_order::seq_cst) const noexcept;
27 std::declval<T const>().fetch_sub(std::declval<T>());
28 std::declval<T const>().fetch_sub(std::declval<T>(), std::declval<std::memory_order>());
44 std::same_as<T> decltype(auto) y = a.fetch_sub(T(4));
47 ASSERT_NOEXCEPT(a.fetch_sub(T(0)));
51 std::same_as<T> decltype(auto) y = a.fetch_sub(T(2), std::memory_order_relaxed);
54 ASSERT_NOEXCEPT(a.fetch_sub(T(0), std::memory_order_relaxed));
63 std::same_as<T> decltype(auto) y = a.fetch_sub(4);
66 ASSERT_NOEXCEPT(a.fetch_sub(0));
70 std::same_as<T> decltype(auto) y = a.fetch_sub(2, std::memory_order_relaxed);
73 ASSERT_NOEXCEPT(a.fetch_sub(0, std::memory_order_relaxed));
81 auto fetch_sub = [](std::atomic_ref<T> const& x, T old_val, T new_val) {
82 x.fetch_sub(old_val - new_val, std::memory_order::release);
85 test_acquire_release<T>(fetch_sub, load);
90 auto fetch_sub_no_arg = [](std::atomic_ref<T> const& x, T old_val, T new_val) { x.fetch_sub(old_val - new_val); };
92 x.fetch_sub(old_val - new_val, std::memory_order::seq_cst);