Created on 2008-09-26.00:00:00 last changed 169 months ago
Proposed resolution:
Add volatile qualification to the deleted copy-assignment operator of all the atomic types:
atomic_bool& operator=(atomic_bool const&) volatile = delete; atomic_itype& operator=(atomic_itype const&) volatile = delete;
etc.
This will mean that the deleted copy-assignment operator will require two conversions in the above example, and thus be a worse match than the assignment from plain bool.
[ 2009-10 Santa Cruz: ]
NAD EditorialResolved. Addressed by N2992.
[ 2009-08-17 Handled by N2925. ]
[ Summit: ]
Move to open. Assign to Lawrence. Related to US 90 comment.
Addresses US 90
The deleted copy-assignment operators for the atomic types are not marked as volatile in N2723, whereas the assignment operators from the associated non-atomic types are. e.g.
atomic_bool& operator=(atomic_bool const&) = delete; atomic_bool& operator=(bool) volatile;
This leads to ambiguity when assigning a non-atomic value to a non-volatile instance of an atomic type:
atomic_bool b; b=false;
Both assignment operators require a standard conversions: the copy-assignment operator can use the implicit atomic_bool(bool) conversion constructor to convert false to an instance of atomic_bool, or b can undergo a qualification conversion in order to use the assignment from a plain bool.
This is only a problem once issue 845 is applied.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-12-05 14:14:49 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg4312 |
2010-10-21 18:28:33 | admin | set | messages: + msg4311 |
2010-10-21 18:28:33 | admin | set | messages: + msg4310 |
2010-10-21 18:28:33 | admin | set | messages: + msg4309 |
2008-09-26 00:00:00 | admin | create |