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

qstring.h:1125:40: error: '= delete' with a message is a C++2c extension

    XMLWordPrintable

Details

    • Android, Linux/Other display system
    • f9af480ed (dev), ebb121699 (6.9)
    • 2025wk20s1QtforAndroid

    Description

      Error

      Run into many compilation errors when building Android developer build on dev for all the module

      In file included from /home/ramipotinkara/dev/envs/qt610_16052025/qt6/qt6-android-bld-x86_64/qtbase/include/QtCore/qstring.h:1:
      /home/ramipotinkara/dev/envs/qt610_16052025/qt6/qtbase/src/corelib/text/qstring.h:1125:40: error: '= delete' with a message is a C++2c extension [-Werror,-Wc++26-extensions]
       1125 |     QString &operator+=(const char *s) QSTRING_DECL_DELETED_ASCII_OP;
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/ramipotinkara/dev/envs/qt610_16052025/qt6/qtbase/src/corelib/text/qstring.h:1124:58: note: expanded from macro 'QSTRING_DECL_DELETED_ASCII_OP'
       1124 | #define QSTRING_DECL_DELETED_ASCII_OP Q_DECL_EQ_DELETE_X("This function is not available under QT_NO_CAST_FROM_ASCII")
            |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/ramipotinkara/dev/envs/qt610_16052025/qt6/qtbase/src/corelib/global/qcompilerdetection.h:1039:49: note: expanded from macro 'Q_DECL_EQ_DELETE_X'
       1039 | #    define Q_DECL_EQ_DELETE_X(reason) = delete(reason)
            |                                                 ^~~~~~

      Used env

      • Qt dev got on 16th of May 2025
      • Target architecture: x86_64
      • Host: Linux Ubuntu 24.04
      • NDK: NDK29 Beta-1 from QTBUG-132640 

      Plausible reason

      • Calling C++26 specific macros on Qt build that does not support them

      Fix proposal

      • Put C+26 specific part behind C+ 26 compilation flag

      Attachments

        Issue Links

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

          Activity

            People

              rampe Rami Potinkara
              rampe Rami Potinkara
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes