Date
2010-12-08.00:00:00
Message id
5471

Content

Paragraph 5 and 6 of [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.