This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
Section: 24.5 [unord], 99 [tr.unord.unord] Status: NAD Submitter: Paolo Carlini Opened: 2005-10-12 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [unord].
View all issues with NAD status.
while implementing the resolution of issue 6.19 I'm noticing the following: according to 22.214.171.124/2 (and 126.96.36.199/2), for unordered_set and unordered_multiset:
"The iterator and const_iterator types are both const types. It is unspecified whether they are the same type"
Now, according to the resolution of 6.19, we have overloads of insert with hint and erase (single and range) both for iterator and const_iterator, which, AFAICS, can be meaningful at the same time *only* if iterator and const_iterator *are* in fact different types.
Then, iterator and const_iterator are *required* to be different types? Or that is an unintended consequence? Maybe the overloads for plain iterators should be added only to unordered_map and unordered_multimap? Or, of course, I'm missing something?
Add to 188.8.131.52p2 (and 184.108.40.206p2):
2 ... The iterator and const_iterator types are both
It is unspecified whether they are the same type.
Add a new subsection to 17.4.4 [lib.conforming]:
An implementation shall not supply an overloaded function signature specified in any library clause if such a signature would be inherently ambiguous during overload resolution due to two library types referring to the same type.
[Note: For example, this occurs when a container's iterator and const_iterator types are the same. -- end note]
[ Post-Berlin: Beman supplied wording. ]
Toronto: The first issue has been fixed by N2350 (the insert and erase members are collapsed into one signature). Alisdair to open a separate issue on the chapter 17 wording.