Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20588

C++17 for Qbs & MSVS2017

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.7.0-beta1
    • Fix Version/s: Qt Creator 4.7.1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Windows
    • Commits:
      43c2f366225af35d9d3a08c545253c754112424b

      Description

      CMake and QMake have known Workarounds to get the Clang Code Model to allow C++17 features.

      For QBS none of these workarounds seem to work.

      QBS File:

      import qbs
      
      Project {
          minimumQbsVersion: "1.7.1"
      
          CppApplication {
              consoleApplication: true
              files: "main.cpp"
      
              Depends { name: "cpp" }
              cpp.cxxLanguageVersion: "c++17"
              //cpp.cxxFlags: "/std:c++17"
              //cpp.defines: "_HAS_CXX17"
          }
      }
      

      Test Code:

      #include <vector>
      
      int main() {
          auto v = std::vector{1, 2};
      }
      

      The C++ Code Model should show CXX17.

        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:
            arbmind Andreas Reischuck
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes