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

Simple processor and Simple Log processor use a non-standard feature deprecated in C++20 #468

Closed
maxgolov opened this issue Dec 18, 2020 · 2 comments · Fixed by #374
Closed
Labels
bug Something isn't working pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)

Comments

@maxgolov
Copy link
Contributor

These two pieces of code:

std::atomic_flag shutdown_latch_{ATOMIC_FLAG_INIT};

std::atomic_flag shutdown_latch_{ATOMIC_FLAG_INIT};

Should be rewritten as follows:

std::atomic_flag static_flag = ATOMIC_FLAG_INIT; // static initialization,
  • and empty constructor for C++20, since This macro is no longer needed and deprecated, since default constructor of std::atomic_flag initializes it to clear state.

I hit this while rebasing my PR for Standard Library support and testing it with C++20. The code won't compile as written in Visual Studio 2019 with C++20 enabled.

@maxgolov maxgolov added the bug Something isn't working label Dec 18, 2020
@maxgolov
Copy link
Contributor Author

I'll fix it.

@maxgolov maxgolov linked a pull request Dec 21, 2020 that will close this issue
@maxgolov
Copy link
Contributor Author

I added the fix in #374

@alolita alolita added the pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.) label Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants