Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C2589: 'false': illegal token on right side of '::'
Forum Updated to NodeBB v4.3 + New Features

C2589: 'false': illegal token on right side of '::'

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 739 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JPSchmidt
    wrote on last edited by
    #1

    Updating from 5.12 msvc 2017 to 5.15 msvc 2019 and I am getting C:\Qt\5.15.1\msvc2019_64\include\QtCore\qcborstreamreader.h:143: error: C2589: 'false': illegal token on right side of '::'

    It appears that in qcborcommon.h True and false is not defined so

    #if defined(False) && defined(True)
    define QT_X11_DEFINES_FOUND 1
    undef True
    undef False
    #endif
    
    

    isn't processed and thus in qcborstreamreader.h

    #if defined(QT_X11_DEFINES_FOUND)
    undef True
    undef False
    
    #endif
    

    isn't but True and False must now be ambiguous
    as a test I undefined them there and it works. So what am I missing because that isn't a valid solution

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      These ifdefs are for Linux (X11), not for Windows. Are you sure you don't define True or False somewhere in your code?

      I don't see this error reported anywhere on Qt bugtracker. If you are certain it is a bug in Qt, please report it.

      (Z(:^

      1 Reply Last reply
      1
      • J Offline
        J Offline
        JPSchmidt
        wrote on last edited by
        #3

        QT_X11_DEFINES_FOUND should have been defined regardless of OS if True/False was defined, bad name in my opinion as it is not unique to X11. Also, bad practice was Qt using False/True in enum. However, it depends on the order they are included.
        After digging, as we don't have our 3rd party libs in the proj; I found in Live555 they have #define True

        sierdzioS 1 Reply Last reply
        0
        • J JPSchmidt

          QT_X11_DEFINES_FOUND should have been defined regardless of OS if True/False was defined, bad name in my opinion as it is not unique to X11. Also, bad practice was Qt using False/True in enum. However, it depends on the order they are included.
          After digging, as we don't have our 3rd party libs in the proj; I found in Live555 they have #define True

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @JPSchmidt said in C2589: 'false': illegal token on right side of '::':

          QT_X11_DEFINES_FOUND should have been defined regardless of OS if True/False was defined, bad name in my opinion as it is not unique to X11.

          Definitely.

          Also, bad practice was Qt using False/True in enum.

          Indeed!

          (Z(:^

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JPSchmidt
            wrote on last edited by
            #5

            created
            https://bugreports.qt.io/browse/QTBUG-88591

            A forced includes hell order due to QT_X11_DEFINES_FOUND crossing header files

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved