Title
The value_type and reference members of std::flat_(multi)map::(const_)iterator are unclear
Status
new
Section
[flat.map.overview][flat.multimap.overview]
Submitter
Jiang An

Created on 2023-08-04.00:00:00 last changed 13 months ago

Messages

Date: 2023-10-15.00:00:00

[ 2023-10-30; Reflector poll ]

Set priority to 3 after reflector poll.

Date: 2023-08-04.00:00:00

[flat.map.overview] and [flat.multimap.overview] currently only require that the iterator types meet Cpp17InputIterator requirements and model the std::random_access_iterator concept.

The intent seems to be that

  • the operator*() returns proxy references of type std::pair<const K&, V&> or std::pair<const K&, const V&> (same as the reference or const_reference types of the container adaptors), and

  • the value_type of these iterators is std::pair<K, V> (same as the value_type of the container adaptors).

However, such intent doesn't seem to be clear.

Moreover, given such possibly intended iterator types don't meet Cpp17ForwardIterator requirements, we may need to mention the exceptions in [container.reqmts] or [associative.reqmts.general].

History
Date User Action Args
2023-10-30 16:39:42adminsetmessages: + msg13785
2023-08-04 00:00:00admincreate