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

Compile fails with Qt in namespace and C++20

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.9, 6.3.0 Beta1, 6.4.0 Beta1
    • 5.15.2, 6.2.2, 6.3.0 Alpha
    • GUI: OpenGL
    • None
    • C++20 / Clang / MSVC
    • Windows
    • 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

            mmutz Marc Mutz
            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