-
Notifications
You must be signed in to change notification settings - Fork 513
Closed
Labels
bugSomething isn't workingSomething isn't workingpr:please-mergeThis PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)
Description
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:
- assignment for anything that is below C++20, as shown here: https://en.cppreference.com/w/cpp/atomic/ATOMIC_FLAG_INIT
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpr:please-mergeThis PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)