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

As a developer of Qt, I expect QDoc to parse C++ as if all __cpp_ feature macros were defined to infinity

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Build tools: qdoc
    • None

    Description

      When writing C++-feature dependent API, I don't want to uglify already-ugly code like

      #ifdef__cpp_char8_t
          Q_WEAK_OVERLOAD
          QString fromUtf8(const char8_t *s)
          { return fromUtf8(reinterpret_cast<const char*>(s)); }
      #endif
      

      by having to think about what this means for QDoc and thus ending up with

      #if defined(__cpp_char8_t) || defined(Q_QDOC)
      

      QDoc just has to parse C++ feature macros as defined (bonus: even unknown ones) and to inifinity (so all version checks will be true, too).

      This should also work in 5.15, because when C++20 hits the road, we'll be having a lot of these in our code.

      Attachments

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

        Activity

          People

            docinfrastructure Documentation Infrastructure Team
            mmutz Marc Mutz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes