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

Clang code model does not recognize std::string_view

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 4.8.0-beta1
    • Qt Creator 4.7.0
    • C/C++/Obj-C++ Support
    • None
    • openSUSE Tumbleweed, x86_64, gcc 7.3.1, gcc 8.1.1

    Description

      Qt Creator does not recognize the std::string_view, std::filesystem::path, etc., because their definitions in the header files are "behind" the macro check:

      #if __cplusplus >= 201703L

      In the C++ Code Model Inspector in the Toolchain Defines:

      #define __cplusplus 201402L
      

      although for a C++17 it must be a 201703L.

      A temporary workaround for the Qbs projects, when the cpp.cxxLanguageVersion: "c++17" is defined, is:

      cpp.defines: ["__cplusplus=201703L"]
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-20884
          # Subject Branch Project Status CR V

          Activity

            People

              kosjar Nikolai Kosjar
              vitech Viktor Kireev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes