Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104631

Clarify that "CONFIG += c++latest" is not compiler-specific

    XMLWordPrintable

Details

    • c155734bfc (qt/qtbase/dev) c155734bfc (qt/tqtc-qtbase/dev)

    Description

      According to https://doc.qt.io/qt-6/qmake-variable-reference.html, c++latest means that
      "Support for the latest C++ language standard is enabled that is supported by the compiler."

       

      This wording implies that qmake would choose a different standard depending on which toolchain is used. However, this is not the case: It currently unconditionally applies -std=gnu++2b to all GCC and Clang toolchains. This causes errors when using Android NDK 21.3, for example.

      error: invalid value 'gnu++2b' in '-std=gnu++2b'

       

      Suggestions

      • Remove the phrase "that is supported by the compiler."
      • Add a disclaimer that this option might fail on older compilers.

      Attachments

        For Gerrit Dashboard: QTBUG-104631
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes