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

Moc does not support C++14 digit separators

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.9.0
    • Build tools: moc
    • None
    • Should be reproducible on any platform
    • Linux/X11

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes