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,
X
denotes a sequence class,a
denotes a value ofX
,i
andj
denote iterators satisfying input iterator requirements and refer to elements implicitly convertible tovalue_type
,[i, j)
denotes a valid range,n
denotes a value ofX::size_type
,p
denotes a valid iterator toa
,q
denotes a valid dereferenceable iterator toa
,[q1, q2)
denotes a valid range ina
, andt
denotes a value ofX::value_type
.
Change 23.1.2 p7:
In Table 84,
X
is an associative container class,a
is a value ofX
,a_uniq
is a value ofX
whenX
supports unique keys, anda_eq
is a value ofX
whenX
supports multiple keys,i
andj
satisfy input iterator requirements and refer to elementsofimplicitly convertible tovalue_type
,[i, j)
is a valid range,p
is a valid iterator toa
,q
is a valid dereferenceable iterator toa
,[q1, q2)
is a valid range ina
,t
is a value ofX::value_type
,k
is a value ofX::key_type
andc
is 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.