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

QAnyStringView argument doesn't accept QStringBuilder

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Commits:
      b7f40416692c357b440c885fe18fa70e2a829820 (qt/qtbase/dev) 5d344408cc7fc1d78f3857f33f7e9d94d08443ae (qt/qtbase/6.2)
    • Sprint:
      Team 2 Foundation_Sprint 47

      Description

      The following snippet fails to compile (with both clang 12.01 and gcc 11.1.0):

       

      #include <QString>
      #include <QAnyStringView>
      #include <QStringBuilder>
      
      void f(QAnyStringView ) {}
      
      int main() {
        f(u"a"_qs % u"b"_qs);
      }
      

      Curiously enough, explicitly constructing a QAnyStringView works fine: 

       

      QAnyStringView view(u"a"_qs % u"b"_qs); // works
      

       

       

        Attachments

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

          Activity

            People

            Assignee:
            mmutz Marc Mutz
            Reporter:
            fabiankosmale Fabian Kosmale
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes