[WIP] C++20 is now the minimum required version#5265
[WIP] C++20 is now the minimum required version#5265WeiqunZhang wants to merge 5 commits intoAMReX-Codes:developmentfrom
Conversation
Supported compilers are: - GCC 11 or newer (for both host builds and CUDA host compilers). - LLVM Clang 14 or newer, including AppleClang 14 on macOS. - Microsoft Visual Studio 2022 (MSVC 19.34 / 17.4) or newer. - NVIDIA CUDA Toolkit 12.2 or newer. - AMD ROCm/HIP 6.0 or newer. - Intel oneAPI DPC++ 2025.3 or newer.
|
The supported compilers were suggested by ChatGPT. We need to verify it. |
|
There may be some GCC issues with the standard library with GCC 11. Some standard library features are not implemented until GCC 12 or 13: https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2020 |
|
We require GCC 13 for Castro now. I don't think GCC 11 will be enough. |
|
What features you guys have used require gcc 12 or 13? Right now, we are not using any in AMReX yet. |
|
std::numbers |
|
|
|
once you turn on std=c++20, clang-tidy will start recommending lots of new modernizations. |
|
We have explicitly disabled them. |
|
the |
|
Since setting a lower minimum in amrex will not prevent application codes from using new features, we might want to start with a lower version, and see that what features we really want to use in amrex that are not supported by old compilers. |
|
yeah, that's a good approach. GCC 11 is getting old, but 12 is probably still around a lot. 16 comes out in a few weeks. |
|
• - GCC 11 – First stable release (11.1) landed on 27 April 2021, kicking off the GCC 11 series. (gnu.org (https://www.gnu.org/software/gcc/releases.html?utm_source=openai))
Practical takeaway: Document GCC 11 support when you need to cover RHEL 9 / Ubuntu 22.04-era systems, but for “current” distros expect GCC 12 as the default toolchain—especially |
Supported compilers are: