File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+ <issue num =" 4350" status =" New" >
5+ <title >Should flat adaptors use `insert_range` when available?</title >
6+ <section >
7+ <sref ref =" [flat.map]" />
8+ <sref ref =" [flat.multimap]" />
9+ <sref ref =" [flat.set]" />
10+ <sref ref =" [flat.multiset]" />
11+ </section >
12+ <submitter >Jonathan Wakely</submitter >
13+ <date >05 Sep 2025</date >
14+ <priority >99</priority >
15+
16+ <discussion >
17+ <p >
18+ As specified in <sref ref =" [queue.mod]" />,
19+ `std::queue::push_range` is guaranteed to use `c.append_range` if that exists.
20+ For `flat_map` and its flat friends, we only ever use `c.insert` and never try
21+ to use `c.insert_range`, `c.append_range`, etc.
22+ LWG thinks the "as if by" wording allows implementations to use `insert_range`
23+ when the container type being adapted is `std::vector` but not for user-defined
24+ containers.
25+ Should the flat adaptors follow `std::queue` and guarantee that they will use
26+ the `xxx_range` member if they exist?
27+ That would mean that user containers need to ensure that any member functions
28+ with those names must behave as expected, but we already require that for
29+ `std::queue`.
30+ </p >
31+ </discussion >
32+
33+ <resolution >
34+ <p >
35+ </p >
36+ </resolution >
37+
38+ </issue >
You can’t perform that action at this time.
0 commit comments