Created on 2008-07-22.00:00:00 last changed 162 months ago
Proposed resolution:
Change Table 97 "Unordered associative container requirements" in [unord.req]:
Table 97: Unordered associative container requirements expression return type assertion/note pre/post-condition complexity b.begin(n) local_iterator
const_local_iterator for const b.Pre: n shall be in the range [0,b.bucket_count()). Note: [b.begin(n), b.end(n)) is a valid range containing all of the elements in the nth bucket.b.begin(n) returns an iterator referring to the first element in the bucket. If the bucket is empty, then b.begin(n) == b.end(n).Constant b.end(n) local_iterator
const_local_iterator for const b.Pre: n shall be in the range [0, b.bucket_count()). b.end(n) returns an iterator which is the past-the-end value for the bucket. Constant
[ Post Summit: ]
Recommend Tentatively Ready.
[ San Francisco: ]
We believe that this is not a substantive change, but the proposed change to the wording is clearer than what we have now.
Is there any language in the current draft specifying the behaviour of the following snippet?
unordered_set<int> s; unordered_set<int>::local_iterator it = s.end(0); // Iterate past end - the unspecified part it++;
I don't think there is anything about s.end(n) being considered an iterator for the past-the-end value though (I think) it should be.
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: + msg4128 |
2010-10-21 18:28:33 | admin | set | messages: + msg4127 |
2010-10-21 18:28:33 | admin | set | messages: + msg4126 |
2008-07-22 00:00:00 | admin | create |