<div dir="ltr">Long ago, I wrote <a href="https://gdal.org/en/stable/development/rfc/rfc68_cplusplus11.html">https://gdal.org/en/stable/development/rfc/rfc68_cplusplus11.html</a>. The world is moving so much faster now compared to back then.<br><br>I'm for switching to C++20 as the minimum. Looking at compiler support tables, it might be that we pick minimum versions for GCC, CLANG, and MSVC. The project would then be constrained to not use a few specific corners of C++20 until the next time the minimum compiler versions are upped.<div><br></div><div>Newer versions of the C++ specification generally lead to improvements in code bases.</div><div><br></div><div><a href="https://en.cppreference.com/w/cpp/20.html">https://en.cppreference.com/w/cpp/20.html</a></div><div><a href="https://en.cppreference.com/w/cpp/compiler_support.html#cpp20">https://en.cppreference.com/w/cpp/compiler_support.html#cpp20</a></div><div><br></div><div>To go with that, I see that PyPI still states Python >= 3.8. That should be upped to >= 3.10 as 3.9 was end-of-life at the end of October.</div><div><br></div><div><a href="https://pypi.org/project/GDAL/">https://pypi.org/project/GDAL/</a></div><div><a href="https://devguide.python.org/versions/">https://devguide.python.org/versions/</a></div><div><a href="https://github.com/OSGeo/gdal/issues/13577">https://github.com/OSGeo/gdal/issues/13577</a> - Set Python minimum version to be 3.10</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Dec 16, 2025 at 2:49 PM Even Rouault via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>