How do folks feel about migrating to C++ 20? #10692
Replies: 7 comments 11 replies
-
CC: @amitkdutta |
Beta Was this translation helpful? Give feedback.
-
c++20 is supported since GCC8, Gluten use GCC9 at least. So it's not a block issues to migrate. Should we step more to C++23? It's supported GCC11. |
Beta Was this translation helpful? Give feedback.
-
C++20 also gives us std::chrono::time_zone, so we could get rid of the external/date stuff that has been sort of problematic. I think the main question is where compilers (and distros) are with C++20 support. What is the default compiler shipping with last version of distros like Ubuntu, Fedora, but also MacOS? Do they fully support C++20? |
Beta Was this translation helpful? Give feedback.
-
Moving to C++20 should be good if we can benefit from coroutines and std::chrono::time_zone |
Beta Was this translation helpful? Give feedback.
-
Here are the current usages:
There is a PR (#10363) that also allows the setup with Clang-15 on Centos9 and Ubuntu (22.04 and 24.04). The idea is to eventually standardize on Clang on all platforms. Clang support for C++20 and C++23 PARTIALFrom that perspective Clang 15 supports C++20 and C++23 partially: https://clang.llvm.org/cxx_status.html For coroutines the doc says:
There doesn't seem to be info on the chrono::time_zone type that is mentioned in the Clang docs and probably would need a test. GCC-11 support for C++20 looks COMPLETE, C++23 PARTIALGCC support for the standards GCC-11 looks to have complete support for C++20 and partial support for C++23 (a small set). |
Beta Was this translation helpful? Give feedback.
-
Folks, it seems there is consensus on the benefits and feasibility of moving to C++ 20. If that's the case, can we start the migration? Anyone interested in driving this effort? |
Beta Was this translation helpful? Give feedback.
-
The initial investigation using gcc12 showed only few issues. No major issues. I can get it to compile by ignoring deprecated errors. There are 3 issues that are resolved by ignoring the warnings and we should fix them. The first one is likely the one with most work.
As a result of updating the C++ standard we should make gcc11 (and clang15) the minimum supported version. We also should drop support for Ubuntu 20.04 (and gcc9). |
Beta Was this translation helpful? Give feedback.
-
It would be cool to get access to coroutines available since C++ 20. How do folks feel about upgrading?
CC: @majetideepak @pedroerp @Yuhta @rui-mo @FelixYBW
Beta Was this translation helpful? Give feedback.
All reactions