This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
atomic<integral>
and atomic<T*>
Section: 32.5.8 [atomics.types.generic] Status: Resolved Submitter: Daniel Krügler Opened: 2010-12-08 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [atomics.types.generic].
View all issues with Resolved status.
Discussion:
Paragraph 5 and 6 of 32.5.8 [atomics.types.generic] impose different requirements on implementations for
specializations of the atomic
class template for integral types and for pointer types:
5 The atomic integral specializations and the specialization
atomic<bool>
shall have standard layout. They shall each have a trivial default constructor and a trivial destructor. They shall each support aggregate initialization syntax.
6 There are pointer partial specializations on the
atomic
class template. These specializations shall have trivial default constructors and trivial destructors.
It looks like an oversight to me, that for pointer specializations the requirements for standard layout and support for aggregate initialization syntax are omitted. In fact, this been confirmed by the N3193 proposal author. I suggest to impose the same implementation requirements for pointer types as for integral types, this should not impose unrealistic requirements on implementations.
[2011-02-10 Reflector discussion]
Moved to Tentatively Ready after 5 votes.
Proposed Resolution
The suggested wording changes are against the working draft N3242.
Change 32.5.8 [atomics.types.generic] p. 6 as indicated:
6 There are pointer partial specializations on the
atomic
class template. These specializations shall have standard layout, trivial default constructors, and trivial destructors. They shall each support aggregate initialization syntax.
Proposed resolution:
Resolved 2011-03 Madrid meeting by paper N3278