Title
Effects of inserting into or erasing from flat container adaptors when an exception is thrown need to be more permissive
Status
new
Section
[associative.reqmts.except][flat.map.overview][flat.multimap.overview] [flat.set.overview][flat.multiset.overview]
Submitter
Jiang An

Created on 2024-01-23.00:00:00 last changed 1 month ago

Messages

Date: 2024-03-15.00:00:00

[ 2024-03-15; Reflector poll ]

Set priority to 2 after reflector poll.

P2767 ยง3.5 is related/conflicting.

Date: 2024-01-23.00:00:00

The issue was originally discovered while implementing flat_(multi_)set in MSVC STL (microsoft/STL#4059).

Currently, the effects of inserting a single element into or erasing elements from a flat container adaptor when an exception is thrown, are implicitly specified in [associative.reqmts.except].

However, given erasing elements from a vector or a deque generally needs to assign elements, which is not guaranteed to be non-throwing, it seems unreasonable to require erase of flat container adaptors not to throw in such a case. Likewise, as inserting a single value into deque is not guaranteed to be effectless when an exception is thrown, so flat container adaptors are unlike to provide such a guarantee.

Perhaps we should conditionally relax the requirements when the underlying containers can't provide them.

History
Date User Action Args
2024-03-15 13:46:33adminsetmessages: + msg14014
2024-01-23 00:00:00admincreate