Title
atomic_address::compare_exchange_* member functions should match atomic_compare_exchange_* free functions
Status
resolved
Section
[atomics.types.address]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 170 months ago

Messages

Date: 2011-05-21.21:15:19

Proposed resolution:

Extend the synopsis around atomic_address in [atomics.types.address] as indicated:

namespace std {
  [..]
  bool atomic_compare_exchange_weak(volatile atomic_address*, void**, void*);
  bool atomic_compare_exchange_weak(atomic_address*, void**, void*);
  bool atomic_compare_exchange_strong(volatile atomic_address*, void**, void*);
  bool atomic_compare_exchange_strong(atomic_address*, void**, void*);
  bool atomic_compare_exchange_weak_explicit(volatile atomic_address*, void**, void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_weak_explicit(atomic_address*, void**, void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_strong_explicit(volatile atomic_address*, void**, void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_strong_explicit(atomic_address*, void**, void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_weak(volatile atomic_address*, const void**, const void*);
  bool atomic_compare_exchange_weak(atomic_address*, const void**, const void*);
  bool atomic_compare_exchange_strong(volatile atomic_address*, const void**, const void*);
  bool atomic_compare_exchange_strong(atomic_address*, const void**, const void*);
  bool atomic_compare_exchange_weak_explicit(volatile atomic_address*, const void**, const void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_weak_explicit(atomic_address*, const void**, const void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_strong_explicit(volatile atomic_address*, const void**, const void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_strong_explicit(volatile atomic_address*, const void**, const void*,
    memory_order, memory_order);
  bool atomic_compare_exchange_strong_explicit(atomic_address*, const void**, const void*,
    memory_order, memory_order);
  [..]
}
Date: 2010-11-13.02:14:14

[ Resolved in Batavia by accepting n3193. ]

Date: 2010-10-27.00:00:00

[ 2010-10-27 Daniel adds: ]

Accepting n3164 would solve this issue differently by removing the overloads with const void* arguments, because they break type-safety.

Date: 2010-10-24.03:04:13

Addresses US-164

atomic_address has member functions compare_exchange_weak and compare_exchange_strong that take arguments of type const void*, in addition to the void* versions. If these member functions survive, there should be corresponding free functions.

History
Date User Action Args
2010-11-18 12:46:23adminsetstatus: nad editorial -> resolved
2010-11-13 02:14:14adminsetmessages: + msg5349
2010-11-13 02:14:14adminsetstatus: open -> nad editorial
2010-10-27 21:43:25adminsetmessages: + msg5173
2010-10-27 21:43:25adminsetmessages: + msg5172
2010-10-24 03:04:13adminsetmessages: + msg4955
2010-08-25 00:00:00admincreate