-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
P0883R2 Fixing Atomic Initialization
As C++17/20 Features and Fixes in Visual Studio 2019 announced, Miya implemented the core functionality of this feature in VS 2019 16.0:
P0883 "Fixing atomic initialization", which changes
std::atomicto value-initialize the containedTrather than default-initializing it, was implemented (also by Miya) when using Clang/LLVM with our standard library. This is currently disabled for C1XX as a workaround for a bug inconstexprprocessing.
Lines 1446 to 1450 in 8f4c816
| #ifdef __clang__ // TRANSITION, VSO-406237 | |
| constexpr atomic() noexcept(is_nothrow_default_constructible_v<_Ty>) : _Base() {} | |
| #else // ^^^ no workaround / workaround vvv | |
| atomic() = default; | |
| #endif // TRANSITION, VSO-406237 |
Now that P0883 has been voted into the Standard, there are at least three more things to do:
- C1XX fixed the
constexprinitialization bug (Microsoft-internal VSO-406237), so we need to remove the workaround. - P0883 was updated to deprecate things. We need to implement those deprecations, and double-check that we've implemented everything that was voted in.
- Feature-test macro as of WG21-N4842:
#define __cpp_lib_atomic_value_initialization 201911L