This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

4352. "operations on flat_multimap are equivalent to those of flat_map"

Section: 23.6.9.1 [flat.multimap.overview] Status: New Submitter: Jonathan Wakely Opened: 2025-09-05 Last modified: 2025-09-05

Priority: Not Prioritized

View all issues with New status.

Discussion:

23.6.9.1 [flat.multimap.overview] p4 says:

Except as otherwise noted, operations on flat_multimap are equivalent to those of flat_map, except that flat_multimap operations do not remove or replace elements with equal keys.

[Example 1: flat_multimap constructors and emplace do not erase non-unique elements after sorting them. — end example]

This doesn't really work, because there is no flat_map operation that is equivalent to the constructors and insert and insert_range functions that take a sorted_equivalent_t tag argument. The flat_map operations that the wording intends to refer to take a sorted_unique_t tag argument. It's a bit of a stretch to say they're equivalent when they don't even have the same parameters, so we need some weasel words here.

Proposed resolution: