Enable C++ 20 standard globally#1257
Conversation
Old style no longer worked due to C++20 compile time requirements
|
Once we merge this, I think we can remove one or two external dependencies (submodules). Right now. printing formatted messages (e.g. errors) is knda complicated and goes through our framework and two externeal dependencies. One of those is "fmt", and it seems that it's functionality is also present in the STL with C++20. So we could get rid of "fmt" and maybe also "spdlog". I don't think we need to have such a complicated setup just for logging. |
|
@jackk18912525: Can you please remove your spam comment and also remove yourself from the reviewers? |
|
A blocker is the HCWPipe third party dependency. I can't get it to compile after updating to C++20, and updating the submodule doesn't help either (esp.a s the library is now differently named). I need help on this from someone from arm, maybe @JoseEmilio-ARM? |
|
@JoseEmilio-ARM : Any update on this? I'm stuck until someone with proper knowledge updates HCWPipe. |
Hi @SaschaWillems , please try again with the changes in #1273 |
|
Awesome. Thank you very much :) |
# Conflicts: # framework/platform/platform.cpp
|
Builds are still failing for me on Android. Seems the HCWStatsProvider needs to be updated to work with C++20: Any idea on how to fix this? |
|
Sorry Sascha, I meant to do that change on my branch and offer it as a PR. my troubles with CLion and Android Studio's github plugin continue to annoy. The change to the constructor in that class seems to allow Android to build locally. I don't want to step on your toes, so please back it out if you don't like it. I'm happy to fix the clang format and copyright header checks, but again, don't want to step on your toes; just wanted to make a suggestion for help. |
|
No worries. That's perfectly fine. And thank you very much for taking care of this, I couldn't figure out how to fix this 👍🏻 |
|
I'm always happy to bang my head against a problem till it works ;-) That said, I've been playing around locally with your branch on adding modules... that's... well it'll take a bit from what I can tell. At least CMake has most of the support. It should help a LOT with compile times. But the changes are getting gnarly. Anyway, I think this PR has all changes necessary for C++20, so that's most of the problem. |
|
So with Steven's fix this now builds on all platforms and is ready for review :) |
|
This does seem to run ok for me, but I am seeing some build warnings from the third party code with this change (using gcc-12.3-1.0 on aarch64): This one pops up 15 times: |
|
Thanks for bringing that up. Catch2 is something we want to get rid of anyway (see #1303). As for KTX: we may want to update that in another PR, I guess it's using it's own outdated version of glm. |
Description
Note: This is work-in-progress and not ready for review yet. I didn't set it to "draft", as I wanted to test CI to see where things break with C++ 20.
Refs #1201
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properly