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

MOC is confused by raw string literal and namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.13.0
    • Build tools: moc
    • None
    • Arch Linux
    • Linux/Wayland

      Here is example:

      main.cpp :

      #include <QObject>
      #include "my_header.h"
      
      class MyClass: public QObject {
        Q_OBJECT
      };
      
      

      my_header.h :

      #include <string>
      
      namespace MY_NAMESPACE {
        void test() {
          std::string test(R"(")");
        }
      }
      
      

      When I run "moc main.cpp" it puts MyClass in MY_NAMESPACE, but MyClass isn't in MY_NAMESPACE

        1. main.cpp
          0.1 kB
        2. my_header.h
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes