WIP: Switch to C++20 standard and using enum/designated initializers#932
WIP: Switch to C++20 standard and using enum/designated initializers#932Destroy666x wants to merge 1 commit intoWarmUpTill:masterfrom
Conversation
ea1c373 to
ca5ff3a
Compare
|
I am not sure if switching to C++23 is a good idea. OBS still supports MacOS 11 which still does not even seem to have full C++20 support. So we might run into strange issues with experimental versions of the c++ standard. Also OBS is still using C++17 and I am not sure if mixing different C++ standards is a good idea. |
I see. Interestingly the build for Mac worked fine here, but failed again for Linux instead. I've seen some lists of compilators randomly supporting random 23 features earlier, but I didn't think it'd affect 20 at least, as that's already 3 years old. But it looks like the development for C++ tools isn't the fastest ever. And they are sometimes even incapable of saying what's wrong - here Clang Format just completely fails on that big test file randomly locally and doesn't specify why ¯_(ツ)_/¯
Hmmm, aren't OBS plugins executed mostly independently? Just wondering about cases when this would be bad for OBS - I'm guessing the other (in-tree?) build method that I'm avoiding might be affected somehow, for example? I guess it's something to leave for later when there's more support. I'll edit it to be 20 to make more sense for now as 23 doesn't have a lot commonly supported welcome features anyways and Clang Format doesn't support 23 at all either. |
ca5ff3a to
22cdfc7
Compare
22cdfc7 to
8a76624
Compare
Switches to newer standard so that:
using enumin switchescan be used for shorter or clearer code. Closes Potentially switch to C++20 #906
The build with the change seems to work fine with my setup, but not too sure if everything is well, e.g. Clang format.
If it's fine then I'll proceed with modifying more switch conditions and struct initializations, hence WIP.