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

C2248 compile error with qcompare.h

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0
    • Core: Other
    • None
    • Windows

    Description

      I think there is a bug with Qt Core when someone is including qcompare.h in their project.

      The error is C2248 about Qt::partial_ordering::partial_ordering and Qt::weak_ordering::weak_ordering. Also seen here

      C:\Qt\6.7.0\msvc2019_64\include\QtCore\qcompare.h:228: error: C2248: 'Qt::partial_ordering::partial_ordering': cannot access private member declared in class 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(228): error C2248: 'Qt::partial_ordering::partial_ordering': cannot access private member declared in class 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(189): note: see declaration of 'Qt::partial_ordering::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(65): note: see declaration of 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore\qcompare.h:408: error: C2248: 'Qt::partial_ordering::partial_ordering': cannot access private member declared in class 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(408): error C2248: 'Qt::partial_ordering::partial_ordering': cannot access private member declared in class 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(189): note: see declaration of 'Qt::partial_ordering::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(65): note: see declaration of 'Qt::partial_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore\qcompare.h:411: error: C2248: 'Qt::weak_ordering::weak_ordering': cannot access private member declared in class 'Qt::weak_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(411): error C2248: 'Qt::weak_ordering::weak_ordering': cannot access private member declared in class 'Qt::weak_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(377): note: see declaration of 'Qt::weak_ordering::weak_ordering'
      C:\Qt\6.7.0\msvc2019_64\include\QtCore/qcompare.h(220): note: see declaration of 'Qt::weak_ordering'
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            yu_jin Yu Jin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes