Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround nvc++ bug with _Pragma at class scope #1179

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions include/stdexec/__detail/__intrusive_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ namespace stdexec {
void __dec_ref() noexcept;
};

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Wtsan")

template <class _Ty>
struct __control_block {
alignas(_Ty) unsigned char __value_[sizeof(_Ty)];
Expand All @@ -70,9 +73,6 @@ namespace stdexec {
__refcount_.fetch_add(1, std::memory_order_relaxed);
}

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Wtsan")

void __dec_ref_() noexcept {
if (1u == __refcount_.fetch_sub(1, std::memory_order_release)) {
std::atomic_thread_fence(std::memory_order_acquire);
Expand All @@ -82,9 +82,10 @@ namespace stdexec {
delete this;
}
}
STDEXEC_PRAGMA_POP()
};

STDEXEC_PRAGMA_POP()

template <class _Ty>
class __intrusive_ptr {
using _UncvTy = std::remove_cv_t<_Ty>;
Expand Down