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

Compile fails with Qt in namespace and C++20

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.2, 6.2.2, 6.3.0 Alpha
    • Fix Version/s: 5.15.9, 6.3.0 Beta1, 6.4.0 Beta1
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      C++20 / Clang / MSVC
    • Platform/s:
      Windows
    • Commits:
      806ba27419 (qt/qtbase/dev) 806ba27419 (qt/tqtc-qtbase/dev) 692c075c8c (qt/qtbase/6.2) 8576b7aab4 (qt/tqtc-qtbase/5.15) 37d4e9c8ad (qt/qtbase/6.3) 692c075c8c (qt/tqtc-qtbase/6.2) 37d4e9c8ad (qt/tqtc-qtbase/6.3)

      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

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

          Activity

            People

            Assignee:
            mmutz Marc Mutz
            Reporter:
            patstew Patrick Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes