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

Make QStringBuilder mandatory

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • None
    • None

      QStringBuilder has seen quite a few years of service and its edges should be well-rounded by now. I think it's time to think about ditching the classical operator+ for string-ish-es and only maintain the QStringBuilder-based operators.

      The advantages

      • QStringBuilder needs only O(N) functions in the number of supported types, classical op+ needs O(N²), even with C++20 magic
      • only ¼ of testing needed d/t only one combination as opposed to four
      • already now, op% can concatenate many more types than op+
      • better performance than nested op+'s

      The disadvantages:

      • SiC for certain types of assignment
      • auto problem (Clazy already warns, IIRC), which can be solved by implementing QTBUG-99291

      So while this may not be possible within Qt 6, we should definitely keep it in mind for Qt 7.

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

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes