[libcxx-commits] [PATCH] D103983: [libc++][rfc] Improve atomic_fetch_(add|sub).*.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 11 07:32:54 PDT 2021
Mordante added inline comments.
================
Comment at: libcxx/include/atomic:1851
_LIBCPP_INLINE_VISIBILITY
- _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst)
- volatile _NOEXCEPT
+ typename enable_if<is_same<_Tp, _Up>::value && is_object<_Up>::value, _Up*>::type
+ fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
----------------
I'm not too happy with this way to constrain the function. I'm open to better suggestions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103983/new/
https://reviews.llvm.org/D103983
More information about the libcxx-commits
mailing list