<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am still using gcc 8.5 that comes with OS which only supports up to C++17 (with some feature not working), and upgrading OS and gcc is out of my control. If we decide to update GDAL build to C++20, I suggest making GDAL build backward compatible to at least
to C++17 or C++11. </div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Fengting</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing">
<meta name="Generator" content="Microsoft Exchange Server">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b><br>
<p style="font-family:Calibri;font-size:10pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
Confidential- Oracle Internal<br>
</p>
From: </b>gdal-dev <gdal-dev-bounces@lists.osgeo.org> on behalf of Even Rouault via gdal-dev <gdal-dev@lists.osgeo.org><br>
<b>Date: </b>Tuesday, December 16, 2025 at 5:48 PM<br>
<b>To: </b>gdal-dev@lists.osgeo.org <gdal-dev@lists.osgeo.org><br>
<b>Subject: </b>[External] : [gdal-dev] Updating requirements to C++20 for GDAL 3.13 ?<br>
<br>
</div>
<div class="PlainText" style="font-size: 11pt;">Hi,<br>
<br>
any thoughts on :<br>
<br>
1) updating our requirements to build GDAL to C++20 ?<br>
<br>
2) and making use of it in our exported C++ headers ? (thus requiring<br>
C++ consumers of our API to also be C++20)<br>
<br>
Our current situation is C++17 required to build GDAL, and our C++<br>
exported headers are C++11 compatible (except some newer ones like<br>
gdalalgorithm_cpp.h, and some bits in )<br>
<br>
We already have 2 (optional) dependencies requiring C++20: Poppler and<br>
PDFium. The next version of libarrow/libparquet will also require<br>
C++20. Note that C++20 is currenly only enabled in GDAL in the drivers<br>
whose dependencies require it.<br>
<br>
C++20 should not be an issue with the recent gcc/clang/MSVC. It would<br>
exclude the old-old-Ubuntu LTS 20.04 whose gcc 9 has only very partial<br>
support for it, but 20.04 standard support ended a few months ago, so<br>
not really relevant to consider for new GDAL version. I'm not totally<br>
sure about Ubuntu 22.04. It has partial support with its default gcc 11,<br>
and improved one with gcc 12 that is also available. At the time GDAL<br>
3.13 will be released, Ubuntu 26.04 will be released, so 24.04 will be<br>
old-LTS, and 22.04 old-old-LTS so discarding it if it becomes too much<br>
of an inconvenience seems fine to me.<br>
<br>
A few things that might be interesting in C++20 for our purposes:<br>
<br>
- bit manipulation offered by <bit><br>
- std::span , particularly when bridging C and C++ API and passing<br>
non-constant size arrays around<br>
- defaulted C++20 == operator<br>
- std::string/string_view::starts_with/ends_with (finally !)<br>
- container.contains() (finally !)<br>
<br>
Even<br>
<br>
--<br>
<a href="https://urldefense.com/v3/__http://www.spatialys.com__;!!ACWV5N9M2RV99hQ!Jpqes3GN7WRXd_nHPWdDTsrk-BQuwBKfwkmtqrv_Iwtgn0zL2-ZufgnX_2Z6UM3EEWGyR4glcTCJdPdoEgsgAyJv$" data-outlook-id="25d0c4e0-cfdd-407f-a6d9-e354351a8db1">https://urldefense.com/v3/__http://www.spatialys.com__;!!ACWV5N9M2RV99hQ!Jpqes3GN7WRXd_nHPWdDTsrk-BQuwBKfwkmtqrv_Iwtgn0zL2-ZufgnX_2Z6UM3EEWGyR4glcTCJdPdoEgsgAyJv$</a><br>
My software is free, but my time generally not.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
gdal-dev@lists.osgeo.org<br>
<a href="https://urldefense.com/v3/__https://lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!Jpqes3GN7WRXd_nHPWdDTsrk-BQuwBKfwkmtqrv_Iwtgn0zL2-ZufgnX_2Z6UM3EEWGyR4glcTCJdPdoEpu8ZfZ7$" data-outlook-id="07edabdb-024e-457f-b09a-838e77e4b838">https://urldefense.com/v3/__https://lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!Jpqes3GN7WRXd_nHPWdDTsrk-BQuwBKfwkmtqrv_Iwtgn0zL2-ZufgnX_2Z6UM3EEWGyR4glcTCJdPdoEpu8ZfZ7$</a><br>
</div>
</div>
</body>
</html>