File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-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 =" 4335" status =" New" >
5+ <title ><code >task</code > shadows the environment's allocator</title >
6+ <section ><sref ref =" [task.promise]" /></section >
7+ <submitter >Dietmar Kühl</submitter >
8+ <date >31 Aug 2025</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ Normally, the <code >get_allocator</code > query forwards the allocator
14+ from the receiver's environment. For <code >task</code > the
15+ <code >get_allocator</code > query used for <code >co_await</code >ed
16+ senders uses the allocator passed when creating the coroutine or
17+ the default if there was none. It should use the receiver's
18+ environment, at least, if the receiver's environment supports a
19+ <code >get_allocator</code > query.
20+ </p >
21+ <p >
22+ Supporting the receiver's allocator isn't always possible: the used
23+ allocator type needs to be known when the coroutine is created. At
24+ that time the receiver isn't known, yet. As a result the receiver's
25+ environment may provide an allocator which is incompatible with the
26+ allocator type used by the coroutine. It may be possible to use the
27+ receiver's allcoator if it is convertible to the allocator type
28+ used by the coroutine and to produce a compile-time error otherwise.
29+ </p >
30+ </discussion >
31+
32+ <resolution >
33+ <p >
34+ </p >
35+ </resolution >
36+
37+ </issue >
You can’t perform that action at this time.
0 commit comments