Skip to content

Fix AtomicSharedPtr for C++20#114

Merged
reyang merged 5 commits into
open-telemetry:masterfrom
pyohannes:c++20-test
Jun 16, 2020
Merged

Fix AtomicSharedPtr for C++20#114
reyang merged 5 commits into
open-telemetry:masterfrom
pyohannes:c++20-test

Conversation

@pyohannes
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread ci/do_ci.sh
make
make test
exit 0
elif [[ "$1" == "cmake.c++20.test" ]]; then
Copy link
Copy Markdown
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
Copy Markdown
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
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Jun 17, 2025
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