Created on 2025-08-31.00:00:00 last changed 2 weeks ago
Unlike generator
the allocator customisation of
task
constraints the allocator type used for the
coroutine to be convertible to the configured
allocator_type
. This prevents easy use of an allocator
especially when no allocator is configured and the default
(std::allocator<std::byte>
) is used. The reason
for this constraint is that the get_allocator
is
forwarded to co_await
ed senders and is intended to be
the same as the allocator used for the coroutine frame.
It may be reasonable to allow use of an arbitrary allocator when
there is no explicit configuration of the allocator_type
.
In this case it may also be resonable to not support the
get_allocator
query when co_await
ing
senders.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-08-31 00:00:00 | admin | create |