Created on 2009-03-20.00:00:00 last changed 162 months ago
Proposed resolution:
Modify Table 105 in [random.access.iterators]:
Table 105 — Random access iterator requirements (in addition to bidirectional iterator) Expression Return type Operational semantics Assertion/note
pre-/post-conditionb - a Distance distance(a,b)return npre: there exists a value n of Distance such that a + n == b. b == a + (b - a).
[ 2010 Pittsburgh: ]
Moved to Ready for Pittsburgh.
[ 2010-02-13 Daniel updates the wording to address the circularity problem. ]
The previous wording is preserved here: Modify [random.access.iterators]p7-9 as follows:
difference_type operator-(const X& a, const X& b);-7- Precondition: there exists a value
-8-n
ofdifference_type
such thata == b + n
.Effects:-9- Returns:b == a + (b - a)
(a < b) ? distance(a,b) : -distance(b,a)
n
[ 2010-02-13 Alisdair opens. ]
Looking again at LWG 1079, the wording in the issue no longer exists, and appears to be entirely an artefact of the concepts wording.
This issue is currently on our Ready list (not even Tentative!) but I think it has to be pulled as there is no way to apply the resolution.
Looking at the current paper, I think this issue is now "NAD, solved by the removal of concepts". Unfortunately it is too late to poll again, so we will have to perform that review in Pittsburgh.
[ 2009-10 Santa Cruz: ]
Moved to Ready.
[ 2009-09-18 Alisdair adds: ]
For random access iterators, the definitions of (b-a) and (a<b) are circular:
From table Table 104 -- Random access iterator requirements:
b - a :==> (a < b) ? distance(a,b) : -distance(b,a) a < b :==> b - a > 0
Addresses UK 265
UK-265:
This effects clause is nonesense. It looks more like an axiom stating equivalence, and certainly an effects clause cannot change the state of two arguments passed by const reference
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg623 |
2010-10-21 18:28:33 | admin | set | messages: + msg622 |
2010-10-21 18:28:33 | admin | set | messages: + msg621 |
2010-10-21 18:28:33 | admin | set | messages: + msg620 |
2010-10-21 18:28:33 | admin | set | messages: + msg619 |
2010-10-21 18:28:33 | admin | set | messages: + msg618 |
2009-03-20 00:00:00 | admin | create |