Created on 2025-08-31.00:00:00 last changed 2 weeks ago
Normally, the get_allocator
query forwards the allocator
from the receiver's environment. For task
the
get_allocator
query used for co_await
ed
senders uses the allocator passed when creating the coroutine or
the default if there was none. It should use the receiver's
environment, at least, if the receiver's environment supports a
get_allocator
query.
Supporting the receiver's allocator isn't always possible: the used allocator type needs to be known when the coroutine is created. At that time the receiver isn't known, yet. As a result the receiver's environment may provide an allocator which is incompatible with the allocator type used by the coroutine. It may be possible to use the receiver's allcoator if it is convertible to the allocator type used by the coroutine and to produce a compile-time error otherwise.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-08-31 00:00:00 | admin | create |