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

1465. Missing arithmetic operators for atomic_address

Section: 99 [atomics.types.address] Status: Resolved Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-01-28

Priority: Not Prioritized

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

View all issues with Resolved status.

Discussion:

Addresses US-161

atomic_address has operator+= and operator-=, but no operator++ or operator--. The template specialization atomic<Ty*> has all of them.

[ 2010-10-27 Daniel adds: ]

Accepting n3164 would solve this issue by replacing atomic_address by atomic<void*>.

[ Resolved in Batavia by accepting n3193. ]

Proposed resolution:

Change 99 [atomics.types.address], class atomic_address synopsis, as indicated:

namespace std {
  typedef struct atomic_address {
    […]
    void* operator=(const void*) volatile;
    void* operator=(const void*);
    void* operator++(int) volatile;
    void* operator++(int);
    void* operator--(int) volatile;
    void* operator--(int);
    void* operator++() volatile;
    void* operator++();
    void* operator--() volatile;
    void* operator--();
    void* operator+=(ptrdiff_t) volatile;
    void* operator+=(ptrdiff_t);
    void* operator-=(ptrdiff_t) volatile;
    void* operator-=(ptrdiff_t);
  } atomic_address;
  […]
}