Title
P1206R7 broke uses of container adaptors with old custom sequence containers
Status
new
Section
[string.find]
Submitter
Jiang An

Created on 2025-05-07.00:00:00 last changed 1 month ago

Messages

Date: 2025-05-07.00:00:00

P1206R7 added some requirements for sequence containers, including program-defined ones.

These requirements mean that if a custom C++20 sequence container type has no newly required member functions added in C++23 mode, it is no longer a sequence container, and uses of it with `std::stack`, `std::queue`, or `std::priority_queue` possibly have undefined behavior or make the program ill-formed. Additionally, some users want to use C++23 flat container adaptors with old sequence containers (llvm/llvm-project#136656), it is unclear whether such uses are intentionally rejected.

Perhaps the requirements on `from_range_t` constructor, `insert_range` and `assign_range` should be made optional, although these operations should have specified semantics whenever being well-formed in immediate contexts.

History
Date User Action Args
2025-05-07 00:00:00admincreate