Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Switch to C++20 standard and using enum/designated initializers #932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Destroy666x
Copy link
Contributor

@Destroy666x Destroy666x commented Dec 3, 2023

Switches to newer standard so that:

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.

@Destroy666x Destroy666x force-pushed the SwitchToCpp23 branch 7 times, most recently from ea1c373 to ca5ff3a Compare December 3, 2023 22:00
@WarmUpTill
Copy link
Owner

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.
(I already tried switching to C++20 to support libremidi version 4 but that already did not work #922)

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.

@Destroy666x
Copy link
Contributor Author

Destroy666x commented Dec 4, 2023

OBS still supports MacOS 11 which still does not even seem to have full C++20 support.

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 ¯_(ツ)_/¯

Also OBS is still using C++17 and I am not sure if mixing different C++ standards is a good idea.

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.

@Destroy666x Destroy666x changed the title WIP: Switch to C++23 standard and using enum/designated initializers WIP: Switch to C++20 standard and using enum/designated initializers Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potentially switch to C++20
2 participants