Details

    Description

      It is sometimes useful to have the data in UTF-16, either because it cannot be represented in 8-bit or because a common use case is to return QStrings from them, which can then be fromRawData()'ed instead of requiring a heap allocation.

      Acceptance criterion:

      1. all existing tests still pass
      2. the following new tests don't fail:
      {
          constexpr auto table = qOffsetStringArray(u8"Foo", u8"Bar");
          QVERIFY(table.viewAt(0) == u8"Foo"); // returns QUtf8StringView
          QVERIFY(table.viewAt(1) == u8"Foo");
      }
      {
          constexpr auto table = qOffsetStringArray(u"Foo", u"Bar");
          QVERIFY(table.viewAt(0) == u"Foo"); // returns QStringView
          QVERIFY(table.viewAt(1) == u"Bar");
      }
      

      std::byte version's name to be bikeshedded.

      Attachments

        Issue Links

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

          Activity

            People

              cnn Qt Core & Network
              mmutz Marc Mutz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes