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

C++17 for Qbs & MSVS2017

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.7.1
    • Qt Creator 4.7.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Windows
    • 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

            kandeler Christian Kandeler
            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