Title
Requirements on iterators of member template functions of containers
Status
cd1
Section
[container.requirements]
Submitter
Peter Dimov

Created on 2006-08-02.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Concepts will probably come in and rewrite this section anyway. But just in case it is easy to fix this up as a safety net and as a clear statement of intent.

Date: 2010-10-21.18:28:33

Proposed resolution:

Change 23.1.1 p3:

In Tables 82 and 83, X denotes a sequence class, a denotes a value of X, i and j denote iterators satisfying input iterator requirements and refer to elements implicitly convertible to value_type, [i, j) denotes a valid range, n denotes a value of X::size_type, p denotes a valid iterator to a, q denotes a valid dereferenceable iterator to a, [q1, q2) denotes a valid range in a, and t denotes a value of X::value_type.

Change 23.1.2 p7:

In Table 84, X is an associative container class, a is a value of X, a_uniq is a value of X when X supports unique keys, and a_eq is a value of X when X supports multiple keys, i and j satisfy input iterator requirements and refer to elements of implicitly convertible to value_type, [i, j) is a valid range, p is a valid iterator to a, q is a valid dereferenceable iterator to a, [q1, q2) is a valid range in a, t is a value of X::value_type, k is a value of X::key_type and c is a value of type X::key_compare.

Date: 2006-08-02.00:00:00

There appears to be no requirements on the InputIterators used in sequences in 23.1.1 in terms of their value_type, and the requirements in 23.1.2 appear to be overly strict (requires InputIterator::value_type be the same type as the container's value_type).

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3153
2010-10-21 18:28:33adminsetmessages: + msg3152
2006-08-02 00:00:00admincreate