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

[REQUEST]: Support std version override for MSVC #6458

Open
rmccampbell opened this issue May 9, 2024 · 0 comments
Open

[REQUEST]: Support std version override for MSVC #6458

rmccampbell opened this issue May 9, 2024 · 0 comments
Labels
request Request for something

Comments

@rmccampbell
Copy link

Is your feature request related to a problem? Please describe

When switching between C/C++ compilers, in most cases it is desirable to keep the same C++ standard option, but unfortunately the command line option is different between GCC/Clang and MSVC (a single pesky = vs :). A solution to this would be to use the Overrides button to specify the C++ standard in a way that can be platform-independent. But this isn't currently implemented for MSVC ("this override is not compatible with the current compiler"), which seems to defeat the purpose.

Describe the solution you'd like

Implement the std version override for MSVC. There are some questions about how versions that don't match between compilers should work, e.g. the "gnu++11" versions or "c++latest". Either they can be converted to the nearest equivalent, or simply dropped if not compatible. I would suggest dropping gnu extension versions and clamping the rest, so e.g. c++23/26/2c would map to c++latest for MSVC.

Describe alternatives you've considered

There are other proposals which would solve this problem in different ways: #2214, #6196, but the latter was closed and is probably too ambiguous, and the former hasn't gained traction in 3+ years. This is a much simpler and targeted solution for the specific problem though ##2214 would still be nice to have.

Additional context

Not applicable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Request for something
Projects
None yet
Development

No branches or pull requests

1 participant