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

Use std::atomic<std::shared_ptr> when applicable #22

Open
MHebes opened this issue Feb 22, 2022 · 0 comments
Open

Use std::atomic<std::shared_ptr> when applicable #22

MHebes opened this issue Feb 22, 2022 · 0 comments

Comments

@MHebes
Copy link

MHebes commented Feb 22, 2022

std::atomic has been specialized for std::shared_ptr in C++20.

Using the std::atomic_* function instead causes a compiler warning at least on MSVC for C++ 20.

Theoretically one could choose which ASP to use based on compiler support. I don't know the right #ifdefs to check off the top of my head but I'm sure they exist!

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

No branches or pull requests

1 participant