Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1657

No cpp.cxxLanguageVersion value for C++20

    XMLWordPrintable

Details

    • All

    Description

      I have heard that I have to use "c+20" value for cxxLanguageVersion to enable C+20 support for QBS projects in other reports:

      https://bugreports.qt.io/browse/QBS-1656
      https://bugreports.qt.io/browse/QTCREATORBUG-26089

      However,

      https://doc.qt.io/qbs/qml-qbsmodules-cpp.html#cxxLanguageVersion-prop

      As you can see above, there is no official way to enable C++20 in QBS project.
      As least for MSVC, any invalid value for cxxLanguageVersion appends "/std:c++latest" compiler flag as you can see here: https://github.com/qbs/qbs/blob/master/share/qbs/modules/cpp/msvc.js#L96

      This enables C+20 features for MSVC 2017 and 2019 but it looks very hacky way because it is undocumented and setting invalid value to cxxLanguageVersion to enable C20 is very nonintuitive. Also, there exists a problem that Qt dependency removes the "/std:c+latest" flag(https://bugreports.qt.io/browse/QBS-1656).

      QBS should provide official value to enable C+20(c20) or latest C+ features(c++latest).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            xylosper Byoung-young Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes