This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

846. No definition for constructor

Section: 32.5.8.2 [atomics.types.operations] Status: CD1 Submitter: Alisdair Meredith Opened: 2008-06-03 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [atomics.types.operations].

View all other issues in [atomics.types.operations].

View all issues with CD1 status.

Discussion:

The atomic classes and class templates (99 [atomics.types.integral] / 99 [atomics.types.address]) have a constexpr constructor taking a value of the appropriate type for that atomic. However, neither clause provides semantics or a definition for this constructor. I'm not sure if the initialization is implied by use of constexpr keyword (which restricts the form of a constructor) but even if that is the case, I think it is worth spelling out explicitly as the inference would be far too subtle in that case.

[ San Francisco: ]

Lawrence will provide wording.

This issue is addressed in N2783.

Proposed resolution:

before the description of ...is_lock_free, that is before 32.5.8.2 [atomics.types.operations] paragraph 4, add the following description.


constexpr A::A(C desired);
Effects:
Initializes the object with the value desired. [Note: Construction is not atomic. —end note]