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

3160. atomic_ref() = delete; should be deleted

Section: 31.7 [atomics.ref.generic] Status: WP Submitter: Tim Song Opened: 2018-10-01 Last modified: 2018-11-13

Priority: 0

View all issues with WP status.

Discussion:

atomic_ref has a deleted default constructor, which causes pointless ambiguities in cases like:

void meow(atomic_ref<int>);
void meow(some_default_constructible_struct);

meow({});

It should have no default constructor rather than a deleted one. (Note that it has other user-defined constructors and so cannot be an aggregate under any definition.)

[2018-10-06 Status to Tentatively Ready after seven positive votes on the reflector.]

[2018-11, Adopted in San Diego]

Proposed resolution:

This wording is relative to N4762.