[libc++] Fix typo in atomic.h comment (#182719)

This commit is contained in:
Connector Switch 2026-02-23 09:43:04 +08:00 committed by GitHub
parent 686acf6382
commit e37c985ba0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -295,13 +295,13 @@ struct atomic<_Tp*> : public __atomic_base<_Tp*> {
}
_LIBCPP_HIDE_FROM_ABI _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
// __atomic_fetch_sub accepts function pointers, guard against them.
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
}
_LIBCPP_HIDE_FROM_ABI _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
// __atomic_fetch_sub accepts function pointers, guard against them.
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
}