|
16 | 16 | #include <__atomic/memory_order.h> |
17 | 17 | #include <__config> |
18 | 18 | #include <__cstddef/ptrdiff_t.h> |
19 | | -#include <__functional/operations.h> |
20 | 19 | #include <__memory/addressof.h> |
21 | 20 | #include <__type_traits/enable_if.h> |
22 | 21 | #include <__type_traits/is_floating_point.h> |
@@ -376,15 +375,17 @@ struct atomic<_Tp> : __atomic_base<_Tp> { |
376 | 375 | auto __builtin_op = [](auto __a, auto __builtin_operand, auto __order) { |
377 | 376 | return std::__cxx_atomic_fetch_add(__a, __builtin_operand, __order); |
378 | 377 | }; |
379 | | - return __rmw_op(std::forward<_This>(__self), __operand, __m, std::plus<>{}, __builtin_op); |
| 378 | + auto __plus = [](auto __a, auto __b) { return __a + __b; }; |
| 379 | + return __rmw_op(std::forward<_This>(__self), __operand, __m, __plus, __builtin_op); |
380 | 380 | } |
381 | 381 |
|
382 | 382 | template <class _This> |
383 | 383 | _LIBCPP_HIDE_FROM_ABI static _Tp __fetch_sub(_This&& __self, _Tp __operand, memory_order __m) { |
384 | 384 | auto __builtin_op = [](auto __a, auto __builtin_operand, auto __order) { |
385 | 385 | return std::__cxx_atomic_fetch_sub(__a, __builtin_operand, __order); |
386 | 386 | }; |
387 | | - return __rmw_op(std::forward<_This>(__self), __operand, __m, std::minus<>{}, __builtin_op); |
| 387 | + auto __minus = [](auto __a, auto __b) { return __a - __b; }; |
| 388 | + return __rmw_op(std::forward<_This>(__self), __operand, __m, __minus, __builtin_op); |
388 | 389 | } |
389 | 390 |
|
390 | 391 | public: |
|
0 commit comments