This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 23.2 [container.requirements] Status: CD1 Submitter: Peter Dimov Opened: 2006-08-02 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [container.requirements].
View all issues with CD1 status.
Duplicate of: 536
Discussion:
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).
Proposed resolution:
Change 23.1.1 p3:
In Tables 82 and 83,
Xdenotes a sequence class,adenotes a value ofX,iandjdenote iterators satisfying input iterator requirements and refer to elements implicitly convertible tovalue_type,[i, j)denotes a valid range,ndenotes a value ofX::size_type,pdenotes a valid iterator toa,qdenotes a valid dereferenceable iterator toa,[q1, q2)denotes a valid range ina, andtdenotes a value ofX::value_type.
Change 23.1.2 p7:
In Table 84,
Xis an associative container class,ais a value ofX,a_uniqis a value ofXwhenXsupports unique keys, anda_eqis a value ofXwhenXsupports multiple keys,iandjsatisfy input iterator requirements and refer to elementsofimplicitly convertible tovalue_type,[i, j)is a valid range,pis a valid iterator toa,qis a valid dereferenceable iterator toa,[q1, q2)is a valid range ina,tis a value ofX::value_type,kis a value ofX::key_typeandcis a value of typeX::key_compare.
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.