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

Fix AtomicSharedPtr for C++20 #114

Merged
merged 5 commits into from
Jun 16, 2020
Merged

Conversation

pyohannes
Copy link
Contributor

This is a fix for #105. Our code was relying on a template specialization of std::atomic for std::shared_ptr<T>, which isn't provided by g++.

Instead we now rely on specializations of std::atomic_store and std::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.

Copy link
Member

@reyang reyang left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@reyang reyang merged commit 668bb8b into open-telemetry:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants