Created on 2008-08-24.00:00:00 last changed 171 months ago
Proposed resolution:
Add const qualification to the pointer values of the atomic_address and atomic<T*> specializations. E.g.
typedef struct atomic_address { void store(const void*, memory_order = memory_order_seq_cst) volatile; void* exchange( const void*, memory_order = memory_order_seq_cst) volatile; bool compare_exchange( const void*&, const void*, memory_order, memory_order) volatile; bool compare_exchange( const void*&, const void*, memory_order = memory_order_seq_cst ) volatile; void* operator=(const void*) volatile; } atomic_address; void atomic_store(volatile atomic_address*, const void*); void atomic_store_explicit(volatile atomic_address*, const void*, memory_order); void* atomic_exchange(volatile atomic_address*, const void*); void* atomic_exchange_explicit(volatile atomic_address*, const void*, memory_order); bool atomic_compare_exchange(volatile atomic_address*, const void**, const void*); bool atomic_compare_exchange_explicit(volatile atomic_address*, const void**, const void*, memory_order, memory_order);
[ 2009-10 Santa Cruz: ]
NAD Editorial. Solved by N2992.
[ 2009-08-17 Handled by N2925. ]
[ 2009-07 Frankfurt ]
Lawrence will handle all issues relating to atomics in a single paper.
LWG will defer discussion on atomics until that paper appears.
Move to Open.
[ Summit: ]
Move to review. Lawrence will first check with Peter whether the current examples are sufficient, or whether they need to be expanded to include all cases.
The atomic_address type and atomic<T*> specialization provide atomic updates to pointers. However, the current specification requires that the types pointer be to non-const objects. This restriction is unnecessary and unintended.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4166 |
2010-10-21 18:28:33 | admin | set | messages: + msg4165 |
2010-10-21 18:28:33 | admin | set | messages: + msg4164 |
2010-10-21 18:28:33 | admin | set | messages: + msg4163 |
2010-10-21 18:28:33 | admin | set | messages: + msg4162 |
2008-08-24 00:00:00 | admin | create |