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

Qt 6.1/6.1.1 compilation fails after MSVC 2019 16.10 update with "/std:c++latest" compiler flag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.1.0, 6.1.1
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Qt 6.1 and 6.1.1RC with MSVC 2019 16.10.31321.278 both fail on compilation of a cmake project set to c++ 20 standard with:

      C:\Qt\6.1.1\msvc2019_64\include\QtCore/qproperty.h(53): fatal error C1083: Cannot open include file: 'experimental/source_location': No such file or directory

      Changing L53 to
      #include <source_location>
      fixes this error.

      Compilation now fails with:
      C:\Qt\6.1.1\msvc2019_64\include\QtCore/qproperty.h(100): error C3083: 'experimental': the symbol to the left of a '::' must be a type

      Changing L100 to
      QPropertyBindingSourceLocation(const std::source_location &cppLocation)

      will successfully build the application.

      CMAKE Compiler output:
      "The CXX compiler identification is MSVC 19.29.30037.0"

       

      Relevant CMake setup:

      set(CMAKE_CXX_STANDARD 20)

      set(CMAKE_CXX_STANDARD_REQUIRED ON) 

      set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /arch:AVX2 /Qpar /EHsc /Gw /Gy /std:c++latest") 

       

      This may be sort of related to QTBUG-93270/QTBUG-93966.

        Attachments

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

          Activity

            People

            Assignee:
            fabiankosmale Fabian Kosmale
            Reporter:
            derreisende77 Christian F
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes