Title
flat_meow range insertion behavior is unclear if in-place merge cannot allocate additional memory
Status
new
Section
[flat.map.modifiers] [flat.set.modifiers] [flat.multiset.modifiers]
Submitter
Tim Song

Created on 2025-09-09.00:00:00 last changed 1 month ago

Messages

Date: 2025-09-09.00:00:00

The range insertion operations of `flat_map`/`multimap`/`set`/`multiset` have this Remarks: element:

Since this operation performs an in-place merge, it may allocate memory.

It is not clear what happens if that allocation fails. If the `inplace_merge` algorithm is used, it will fall back to a less efficient 𝒪(N log N) algorithm, but this is not reflected in the Complexity: element. Alternatively, if the allocation failure is reported by an exception, that should be called out in the spec.

History
Date User Action Args
2025-09-09 00:00:00admincreate