[PATCH] libstdc++: Remove constraints on std::generator::promise_type::operator new

Arsen Arsenović arsen@aarsen.me
Wed Dec 11 14:59:17 GMT 2024


Jonathan Wakely <jwakely@redhat.com> writes:

> Like this?
>
> /home/jwakely/gcc/15/include/c++/15.0.0/generator:478:25: error:
> static assertion failed: the argument that follows std::allocator_arg
> must be convertible to the generator's allocator type
>  478 |           static_assert(convertible_to<const _Alloc&, _Allocator>,
>      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Can we be more precise than "the argument"? Is "the coroutine
> argument" accurate? The function that the argument is passed to is a
> coroutine, so I think that's correct.

Yes, I think 'coroutine argument' is OK - this function is only called
for allocating the coroutine state when a coroutine is starting, so it
can't be anything else (well, unless the user does the call manually for
some reason..).
-- 
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20241211/33f23e40/attachment.sig>


More information about the Libstdc++ mailing list