[PATCH] libstdc++: add range support to std::optional (P3168)

Giuseppe D'Angelo giuseppe.dangelo@kdab.com
Tue Jun 10 07:18:45 GMT 2025


Hello,

The attached patch implements C++26's range support for std::optional.

It's also available on Forge here:

https://forge.sourceware.org/gcc/gcc-TEST/pulls/54

It's mostly straightforward, but I had to lift format_kind out of 
<format> (together with a few other helpers) to avoid <optional> to 
depend on that. I put it in formatfwd.h, but maybe it ought to go in its 
own header?


Thank you,

-- 
Giuseppe D'Angelo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-add-range-support-to-std-optional-P3168.patch
Type: text/x-patch
Size: 15774 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20250610/147227a9/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4613 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20250610/147227a9/attachment-0001.p7s>


More information about the Libstdc++ mailing list