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

Moc does not support C++14 digit separators

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Fixed
    • Affects Version/s: 5.9.0
    • Fix Version/s: None
    • Component/s: Build tools: moc
    • Labels:
      None
    • Environment:
      Should be reproducible on any platform
    • Platform/s:
      Linux/X11

      Description

      The following header file (mocds.h) does not work with moc:

      #include <QObject>
      class DSTest : public QObject
      {
          Q_OBJECT
          const int BAD_CONST = 0b1000'0000;
          const int GOOD_CONST = 0b10000000;
      }
      
      

      Running moc on the file as-is:

      $ moc mocds.h -o mocds.cpp
      

      results in the dreaded

      mocds.h:0: Note: No relevant classes found. No output generated.
      

      If you comment out the BAD_CONST, it works fine.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              ogoffart Olivier Goffart (Woboq GmbH)
              Reporter:
              vugo vugo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes