This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
task uses unusual allocator customisationSection: 33.13.6.5 [task.promise] Status: Resolved Submitter: Dietmar Kühl Opened: 2025-08-31 Last modified: 2026-04-01
Priority: 2
View all other issues in [task.promise].
View all issues with Resolved status.
Discussion:
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_awaited 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_awaiting
senders.
[2025-10-17; Reflector poll. Status changed: New → LEWG.]
Set priority to 2 after reflector poll. Send to LEWG.
[2026-04-01 Resolved by the adoption of P3980R1 at Croydon, 2026. Status changed: LEWG → Resolved.]
Proposed resolution: