-
Notifications
You must be signed in to change notification settings - Fork 410
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
Fix AtomicSharedPtr for C++20 #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -20,6 +20,16 @@ if [[ "$1" == "cmake.test" ]]; then | |||
make | |||
make test | |||
exit 0 | |||
elif [[ "$1" == "cmake.c++20.test" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention this in the README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
This is a fix for #105. Our code was relying on a template specialization of
std::atomic
forstd::shared_ptr<T>
, which isn't provided byg++
.Instead we now rely on specializations of
std::atomic_store
andstd::atomic_load
for everything except gcc 4.8.To guard against similar issues in future, I added a C++20 test to the shiny new GHA CI.