Details
-
User Story
-
Resolution: Unresolved
-
P1: Critical
-
None
-
None
-
None
-
21
-
Foundation PM Prioritized
Description
It seems, we're supposed to start using std::span in our APIs instead of, say, QList, but I have some problems implementing this:
- for existing APIs
- for setters, I usually can overload existing functions, but what about ambiguities of the new span setters with existing setters?
- 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
- 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