bzflag
bzflag copied to clipboard
C++14
This PR updates our minimum language compliance to C++14, with optional support for C++17.
As for the new commit about gluProject moved to glm:project, I hope you can remove from README.macos the warning about HUDRenderer.cxx
who fixed all the glu warnings? I fixed only the gluProject
who fixed all the glu warnings? I fixed only the gluProject
They were suppressed in 82ced1b2. It requires running premake again for this to take effect, though.
As far as whether we actually want to change our C++ standard, that's a decision I'd like to see more discussion about, along with some data on operating system and compiler support. Keep in mind that we haven't even had an official release that fully utilizes C++11, yet.
I figured this PR would be a forcing function for any discussion, if needed. What form would you like this discussion to take? As to support, clang 10 (MacOS), g++ 4.9, and VS 2017 all support C++14.
It looks like some parts of C++14 need gcc 5 (or maybe even a newer version?). Even in 4.9, some features of C++11 were added, such as support for
So maybe the conversation should be around which features of newer C++ standards we want to use (not just a blanket "C++14" or "C++17") and which platforms we need to compile on (such as Debian Buster, Visual Studio 2017, macOS 10.13 w/ Xcode 10.1, etc).
Exactly. Sort of. Rather than getting into a pick-and-choose feature set (although, for what it's worth CMake makes specifying these features easy), I think it is better to choose a minimum compiler version. I would note that our DEVINFO does say that extensions should not be used, so we should require standards conformance and allow developers to write to the standard.
We specify versions of things required to build this game (SDL2, for example). We require people to install things (like an alpha version of premake5). We can specify minimum supported compiler. gcc is up to version 9.2; the last 4.9 release was over 3 years ago.
Debian Buster has a gcc-7 (7.4) package. Windows VS 2017 supports the C++14 flag (VS 2019 is out). MacOS 10.13 XCode 10.1 clang 10 claims full C++14 compliance. Actually, this page is probably the most useful, with respect to compliance.
I guess the question is, for a development head (master) do we really need to lock into the lowest common denominator at this point? I'm not sure I see any reason to avoid adopting a 5-year old standard, but maybe I'm missing something?