Created on 2004-02-27.00:00:00 last changed 171 months ago
Proposed resolution:
To remove this limitation, I suggest to change the operational semantics for this column to:
{ Distance m = n; if (m >= 0) while (m--) --r; else while (m++) ++r; return r; }
[ 2009-10 Santa Cruz: ]
The group reviewed the wording in the draft and agreed that n is of difference type, the difference type is signed, and the current wording is correct. Moved to NAD.
[ 2009-07 Frankfurt: ]
Need to look at again without concepts.
There was a question about this phrase in the discussion: "the expression -n must be valid, which is not the case for unsigned types." If n is an object of the iterator difference_type (eg ptrdiff_t), then it is never unsigned.
[ Batavia (2009-05): ]
We agree with Alisdair's observations.
Move to NAD.
[ Post Summit Alisdair adds: ]
This issue refers to a requirements table we have removed.
The issue might now relate to [random.access.iterators] p5. However, the rationale in the issue already recognises that the difference_type must be signed, so this really looks NAD.
[ Sydney: Possibly not a real problem, since difference type is required to be a signed integer type. However, the wording in the standard may be less clear than we would like. ]
In 24.1.5 [lib.random.access.iterators], table 76 the operational semantics for the expression "r -= n" are defined as "return r += -n". This means, that the expression -n must be valid, which is not the case for unsigned types.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2710 |
2010-10-21 18:28:33 | admin | set | messages: + msg2709 |
2010-10-21 18:28:33 | admin | set | messages: + msg2708 |
2010-10-21 18:28:33 | admin | set | messages: + msg2707 |
2010-10-21 18:28:33 | admin | set | messages: + msg2706 |
2010-10-21 18:28:33 | admin | set | messages: + msg2705 |
2004-02-27 00:00:00 | admin | create |