1010. operator-= should use default in concept

Section: 24.3.5.7 [random.access.iterators] Status: NAD Concepts Submitter: Alisdair Meredith Opened: 2009-03-11 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [random.access.iterators].

View all issues with NAD Concepts status.

Discussion:

Addresses UK 263

This requirement on operator-= would be better expressed as a default implementation in the concept, with a matching axiom.

[ Batavia (2009-05): ]

The proposed resolution should also remove paragraph 5 and the declaration that precedes it. Further, we should provide an axiom that captures the desired semantics. This may be a broader policy to be applied. Move to Open.

Proposed resolution:

Change 24.3.5.7 [random.access.iterators]:

concept RandomAccessIterator<typename X> : BidirectionalIterator<X>, LessThanComparable<X> {
  ...
  X& operator-=(X& x, difference_type n) { return x += -n; }
  ...
}