Minimum supported C++ compiler standard

Create issue
Issue #153 new
M. Gronle created an issue

Currently, itom is still designed to work with C++03, however there are many reasons, why it could be an advantage to move to a minimum requirement of C++11. I think that we should finally discuss this before we start implementing things from C++11 (e.g. nullptr, =delete operator, auto types…). Qt moved to C++11 from Qt 5.7 on.

In the past, I still wanted to supported C++03 since it was desired that even older compilers of older stable linux versions (I have Debian in mind) are able to compile itom. However, I guess that even most used Debian distributions are able to compile C++11 code, now.

From my point of view, we could fix now that a C++11 compiler is a minimum requirement to compile itom. What are your thoughts about this? Please comment on it. Of course Visual Studio 2010 would not be able to fully support C++11, however I guess that this is ok for us.

To be honest, I am currently not sure if we really are C++03 compatible right now, since probably nobody tried to compile itom with such an old compiler in the last month. Maybe this is a reason to move now to the official minimum requirement of C++11.

Please comment on this, such that we can fix this point.

Comments (6)

  1. M. Gronle reporter

    @Robin Hahn : Can you check if anybody or any lab system at ITO is currently using itom, that is still compiled with MSVC 2010 or older? What about the windows / linux systems or C.P. or T.H. (Mr. never-change-a-running-system 🙂 )?

  2. Oliver Schwanke

    Qt moved to C++11 from Qt 5.7 on:

    Qt 5.9 has reached EOL in May 2020

    C++11 is supported from gcc 4.8.1. on, which is from 2013, current stable is 10.2, however reasonable is to have one version before, so 9.3 should be available on most systems.

    I am not sure whether anyone wants to actually support a 10 year old compiler and push new features to it unless you are paid to do so(or it is your main target, thanks peppermintOS 🙂 .

    On my end, i do not have a system that old so i cannot even check whether everything in itom is compiling on that.

    Agreeing on a c++ standard would be nice.

    It is possible to set the standard in the cmake projects, so everyone can read it.

    I’m in favor of cpp17, because cpp20 is too new … and some cpp17 features are quite good if used…

    Ofc the toolchain needs to be verified.

  3. M. Gronle reporter

    Yes, setting the C++ standard in cmake would be the goal.

    I would vote for c++11, since I know many people who use Visual Studio 2015 in their companies (including me and many of my colleagues) and VS2015 does not (fully) support c++14, c++17 or c++20.
    Recently we got a question here in the issue section from sobody who used Ubuntu 18.04, which is not so old. Based on this resource https://packages.ubuntu.com/de/bionic/gcc I think that this ubuntu only has gcc 7.0, which supports many C++17 features, but not all. All in all, I think that we should be compatible to Ubuntu, Debian, Fedora and CentOS, which are 5-6 years old.

    And for Visual Studio I vote for VS2015 (for me a must-have) or younger and therefore for C++11.

  4. M. Gronle reporter

    In order to get a better overview about supported C++ standards in different compilers and operating systems, I collected a list of different, common operating systems:

    Windows:

    C++11 is fully supported from MSVC2015 on (many features also in earlier versions, however all from 2015 on).
    C++14 is fully supported from MSVC2017 15.0 on

    Linux:

    Here is a list of commonly used linux versions, which still have at least an active maintainance / LTS support:

    C++11 is fully supported from gcc 4.8 on

    C++14 is fully supported from gcc 5.0 on.

    Result:

    The gcc compiler, shipped with all currently maintained linux versions of Debian, Ubuntu, CentOS and Fedora can compile with the C++11 standard.

  5. M. Gronle reporter

    After having discussed this issue with ITO, too, I would say that we should go for C++11 as minimum C++ standard.

    • This standard is fully supported by Visual Studio 2015, which is still commonly used, VS 2010 and VS 2013 are not supported any more then
    • This standard is further supported by all Debian, Fedora, Ubuntu and CentOS operating systems, whose end of life (LTS) is not expired yet (see table above). CentOS 6 is not supported any more.
    • Raspbian (Raspberry Pi OS) should be supported from releases after 2015-09-25 on (based on Debian 8 )

  6. Log in to comment