[PATCH v2] libstdc++: Add lvalue overload for generator::yield_value
Arsen Arsenović
arsen@aarsen.me
Fri Apr 25 01:09:57 GMT 2025
Jonathan Wakely <jwakely@redhat.com> writes:
> This was approved in Wrocław as LWG 3899.
>
> This avoids creating a new coroutine frame to co_yield the elements of
> an lvalue generator.
>
> libstdc++-v3/ChangeLog:
>
> * include/std/generator (generator::yield_value): Add overload
> taking lvalue element_of view, as per LWG 3899.
> * testsuite/24_iterators/range_generators/lwg3899.cc: New test.
> ---
>
> Added a testcase (thanks to Arsen).
>
> Tested x86_64-linux.
>
LGTM also, assuming the test still passes :-)
Thank you again!
--
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 381 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20250425/6d8fe848/attachment.sig>
More information about the Libstdc++
mailing list