Created on 2004-10-13.00:00:00 last changed 167 months ago
Proposed resolution:
Change Table 101 — Output iterator requirements in [output.iterators]:
Table 101 — Output iterator requirements Expression Return type Operational semantics Assertion/note pre-/post-condition X(a) a = t is equivalent to X(a) = t. note: a destructor is assumed. X u(a);
X u = a;*r = o result is not used Post: r is not required to be dereferenceable. r is incrementable. ++r X& &r == &++r Post: r is dereferenceable, unless otherwise specified. r is not required to be incrementable. r++ convertible to const X& {X tmp = r;
++r;
return tmp;}Post: r is dereferenceable, unless otherwise specified. r is not required to be incrementable. *r++ = o; result is not used
Rationale:
Solved by N3066.
[ 2010 Pittsburgh: ]
Moved to
NAD EditorialResolved. Rationale added below.
[ 2009-10 Santa Cruz: ]
Move to Ready after looking at again in a larger group in Santa Cruz.
[ 2009-10 Santa Cruz: ]
Modified wording. Set to Review.
[ 2009-07-21 Alisdair requests change from Review to Open. See thread starting with c++std-lib-24459 for discussion. ]
[ 2009-07 Frankfurt ]
Bill provided wording according to consensus.
[ Lillehammer: Real issue. There are lots of constraints we intended but didn't specify. Should be solved as part of iterator redesign. ]
The note on 24.1.2 Output iterators insufficiently limits what can be performed on output iterators. While it requires that each iterator is progressed through only once and that each iterator is written to only once, it does not require the following things:
Note: Here it is assumed that x is an output iterator of type X which has not yet been assigned to.
a) That each value of the output iterator is written to: The standard allows: ++x; ++x; ++x;
b) That assignments to the output iterator are made in order X a(x); ++a; *a=1; *x=2; is allowed
c) Chains of output iterators cannot be constructed: X a(x); ++a; X b(a); ++b; X c(b); ++c; is allowed, and under the current wording (I believe) x,a,b,c could be written to in any order.
I do not believe this was the intension of the standard?
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-03-05 00:04:13 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg2816 |
2010-10-21 18:28:33 | admin | set | messages: + msg2815 |
2010-10-21 18:28:33 | admin | set | messages: + msg2814 |
2010-10-21 18:28:33 | admin | set | messages: + msg2813 |
2010-10-21 18:28:33 | admin | set | messages: + msg2812 |
2010-10-21 18:28:33 | admin | set | messages: + msg2811 |
2010-10-21 18:28:33 | admin | set | messages: + msg2810 |
2010-10-21 18:28:33 | admin | set | messages: + msg2809 |
2004-10-13 00:00:00 | admin | create |