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

Compile fails with Qt in namespace and C++20

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      C++20 / Clang / MSVC
    • Platform/s:
      Windows

      Description

      Compiling pretty much any Qt widgets application fails with Qt in namespace in C++20 mode, because it can't find anything in the std namespace. The reason is that qopengl.h has a #include <stddef.h> inside QT_BEGIN_NAMESPACE, and apparently stddef now declares something in the std namespace. The include should be wrapped in QT_BEGIN_INCLUDE_NAMESPACE.

        Attachments

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            patstew Patrick Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change