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

As a developer of Qt, I'd like to base my std::span APIs on a project-wide standard to avoid inconsistencies




      It seems, we're supposed to start using std::span in our APIs instead of, say, QList, but I have some problems implementing this:

      1. for existing APIs
        1. for setters, I usually can overload existing functions, but what about ambiguities of the new span setters with existing setters?
        2. for getters, I cannot overload. Say the getter is called meeps. What should the new name be called? spanMeeps()? meepsAsSpan()? meepsSpan()? Is there another way than to use such ugly names? I thought we wanted users to use these functions. Making them have long unwieldy names doesn't seem to be a good way to facilitate that, IMNSHO
      2. for new API, I have access to all the names and can arrange for the std::span names to be nice and maybe have AsList names for returning QList. But the std::span names won't be available for me to use in Qt's implementation. What do we do here? And if std::span is all that's needed for C++20 code, what do we do in C++17 mode? Do we need a QSpan? Or a q20::span?

      It would be nice if all these questions were settled (e.g. in a QUIP) before we go and spray std::span across all our APIs with each module/developer using their own work-around.

      Acceptance criteria:

      • a QUIP is drafted, discussed, and committed to, which deals with the above questions


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



            cnn Qt Core & Network
            mmutz Marc Mutz
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            0 Vote for this issue
            1 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes