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

QLOCATION invalid in C++11

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: 4.7.3
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None

      Description

      With the introduction of user-defined literals, C++11 now requires a space after some strings:

      — /usr/include/qt4/QtCore/qobjectdefs.h 2011-03-30
      07:19:08.000000000 +0200
      +++ in/QtCore/qobjectdefs.h 2011-11-10 14:12:10.128922487 +0100
      @@ -214,7 +214,7 @@
      #define QTOSTRING_HELPER(s) #s
      #define QTOSTRING(s) QTOSTRING_HELPER(s)
      #ifndef QT_NO_DEBUG

        1. define QLOCATION "\0"_FILE":"QTOSTRING(LINE_)
          +# define QLOCATION "\0" _FILE":" QTOSTRING(LINE_)
      1. define METHOD(a) qFlagLocation("0"#a QLOCATION)
      2. define SLOT(a) qFlagLocation("1"#a QLOCATION)
      3. define SIGNAL(a) qFlagLocation("2"#a QLOCATION)

      See this thread for a discussion on the subject:
      https://groups.google.com/forum/#!topic/comp.std.c++/9nD4Mb8pN1Q

      You may want to add even more space, I just added the minimum so g+-4.7 -std=c+11 accepted it.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              earthdomain Earth Domain (Inactive)
              Reporter:
              marc1842fr Marc Glisse
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes