-
Notifications
You must be signed in to change notification settings - Fork 219
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
Establish a C++ version for the project #375
Comments
That's already been done: Lines 9 to 11 in 09baae4
Not sure why you would establish a version that's over 10 years old though. All respectable compilers (GCC/Clang/MSVC) support c++20. And with c++17 & 20 we can replace a lot of windows-specific code with cross-platform code from the standard library. |
You pushed those lines in CMakeLists.txt and also pushed some C++20 code, but there are not a public discuss about to switch to C++20, for this I opened this issue to do it properly, in an open and public manner giving voice to anyone. About to use C++20 I am totally against it because it is not fully supported on MSVC 2019 and the implemented part have serious unfixed STL issues. P.S. I wrote (and write) tons of C++03 portable to every arch/OS without major problems. |
Yes I did 😝
I brought it up in an issue here and in the forums.
Upgrade your compiler. Believe it or not, but MSVC is currently the one compiler that has a full support for C++20: https://en.cppreference.com/w/cpp/compiler_support#cpp20 Others are not far behind though.
Why not C++98?... 😉 It's 2023... maybe it's time to upgrade? |
On a serious note:
And these are just a few things that came to my mind. Why deny yourself all these features just because you have an older compiler? |
I don't have forum access, and here... I think that I didn't see it, sorry. Is this the issue?
Ok, this can be a problem then to port it to Linux or BSD (also the MSVC 2019 support is incomplete and bugged)
Nah, latest != better
I only see real advantages on C++11. Later versions don't give me advantages and drop support for a lot OS/compilers adding STL complexity and worse performance |
The forum and discord are still quite active. It is probably worth joining for the discussions that happen there. |
Actually, portability is exactly why I think we should push for later standards. I'm a long-time Linux user and I would like to see Orbiter running natively on Linux. Currently, Orbiter code is full of windows-specific code because at the time it was written, there was no standard for such things as file/directory manipulation for example. But, with C++17 we can now convert it into portable code that will run on other platforms. C++20 gives us portable threads with cancellation ( If there is a specific issue you are running into, I'm happy to help figure it out. |
I'm also a long term Linux user, and also want to have it native, but I don't want to sacrifice other OS in the way. P.S. https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170 |
I can reset this to C++17. Setting a required standard to highers existing is usually not a good idea since not everybody have the latest tools. Right now the code compiles on C++14 and might do well on C++11 haven't tested that. |
In my humble opinion (and not because I'm using it), C++17 is a good choice between a more established standard (which has less features) and a "cutting-edge" standard, which brings support issues, bugs, etc. |
Probably related to this "standards issue": compiling a project in VS2017 that uses "VesselAPI.h" and "drawapi.h" files, I need to add |
Will be fixed along "Terrain collision" PR. |
It's a good idea to set a specific C++ version and follow it to avoid future problems, for example, someone pushing C++20 code that breaks all MSVC 2019 builds.
Personally I propose to follow C++11 that is very compatible between a lot compilers/versions.
The text was updated successfully, but these errors were encountered: