Skip to content

Commit acd8d8e

Browse files
committed
New issue from Jiang An: "P1206R7 broke uses of container adaptors with old custom sequence containers"
1 parent f9f91cf commit acd8d8e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

xml/issue4261.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4261" status="New">
5+
<title>P1206R7 broke uses of container adaptors with old custom sequence containers</title>
6+
<section><sref ref="[string.find]"/></section>
7+
<submitter>Jiang An</submitter>
8+
<date>7 May 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
<paper num="P1206R7"/> added some requirements for sequence containers, including program-defined ones.
14+
<p/>
15+
These requirements mean that if a custom C++20 sequence container type has no newly required member
16+
functions added in C++23 mode, it is no longer a sequence container, and uses of it with
17+
`std::stack`, `std::queue`, or `std::priority_queue` possibly have undefined behavior or
18+
make the program ill-formed. Additionally, some users want to use C++23 flat container adaptors
19+
with old sequence containers (<a href="https://github.com/llvm/llvm-project/issues/136656">llvm/llvm-project#136656</a>),
20+
it is unclear whether such uses are intentionally rejected.
21+
<p/>
22+
Perhaps the requirements on `from_range_t` constructor, `insert_range` and `assign_range` should be made optional,
23+
although these operations should have specified semantics whenever being well-formed in immediate contexts.
24+
</p>
25+
</discussion>
26+
27+
<resolution>
28+
</resolution>
29+
30+
</issue>

0 commit comments

Comments
 (0)