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

Code using features deprecated in C++20 #118

Open
TopoIogist opened this issue Nov 8, 2021 · 2 comments
Open

Code using features deprecated in C++20 #118

TopoIogist opened this issue Nov 8, 2021 · 2 comments

Comments

@TopoIogist
Copy link

TopoIogist commented Nov 8, 2021

When compiling with C++20 support, errors as such are thrown:

Error C4996 'std::atomic_load': warning STL4029: std::atomic_*() overloads for shared_ptr are deprecated in C++20.
The shared_ptr specialization of std::atomic provides superior functionality.
You can define _SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING or
_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
C:\Sourcecode\screen_capture_lite\screen_capture_lite\internal\ThreadManager.h 148

If possible the code should avoid features that are deprecated in c++20. The shared_ptr could be changed to an atomic_shared_ptr and the atomic_load removed.

@smasherprog
Copy link
Owner

I agree. there was a weird state where some compilers didnt support the new c++ version so i left it. If you want to give a stab at a PR, that would be most welcome :)

@smasherprog
Copy link
Owner

Ill keep the PR until the other compilers catch up to Visual studio.....
Never thought I'd say that..

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

2 participants