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

Qt dependency removes /std:c++latest flag for msvc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 1.18.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      {{CppApplication {
          // Depends { name: "Qt.core" }
          consoleApplication: true
          files: "main.cpp"cpp.cxxLanguageVersion: "c++20"
      }}}

      Above qbs file emits "/std:c++latest" option when compile main.cpp file.
      In fact, the value of cpp.cxxLanguageVersion here doesn't matter because all strings except in ["c++17", "c++14", "c++11", "c++98"] will append "/std:c++latest" as you can see here: https://github.com/qbs/qbs/blob/master/share/qbs/modules/cpp/msvc.js#L96

      However, if I uncomment "Qt.core" dependency, "/std:c+latest" flag disappears and I cannot use latest C+20 features.

      FYI, `cpp.cxxLanguageVersion: "c+17"` works as expected with or without Qt dependency, although this is not an option for me because I need C+20 features.

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes