Created on 2023-06-20.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4950.
Modify [atomics.types.generic.general] as indicated:
-1- […]
-2- The specialization atomic<bool> is a standard-layout struct. It has a trivial destructor.
[ 2023-11-11 Approved at November 2023 meeting in Kona. Status changed: Voting → WP. ]
[ 2023-10-27; Reflector poll ]
Set status to Tentatively Ready after eight votes in favour during reflector poll.
std::atomic<bool> was originally required to have a trivial default constructor and a trivial destructor [C++11 N3337: Section [atomics.types.generic], Paragraph 5], the same as the integral [C++11 N3337: Section [atomics.types.generic], Paragraph 5] and pointer specializations [C++11 N3337: Section [atomics.types.generic], Paragraph 6]. P0558 rearranged the text, accidentally (as far as we can tell) removing the constructor and destructor requirements from std::atomic<bool>, which has the surprising effect that std::atomic<bool> has no longer the same constructor/destructor guarantees as std::atomic<int>.
C++20 removed the "trivial default constructor" requirement from all specializations. A specialization for floating-point types was added with a trivial destructor [N4861: Section [atomics.types.float], Paragraph 2)].History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-13 14:08:10 | admin | set | messages: + msg13845 |
2023-11-13 14:08:10 | admin | set | status: voting -> wp |
2023-11-07 21:41:54 | admin | set | status: ready -> voting |
2023-10-27 21:22:44 | admin | set | messages: + msg13764 |
2023-10-27 21:22:44 | admin | set | status: new -> ready |
2023-06-25 09:23:01 | admin | set | messages: + msg13664 |
2023-06-20 00:00:00 | admin | create |