Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
3
-
Foundation PM Prioritized
Description
See epic for more details.
The std::string::assign() overload set is a bit ... special (https://en.cppreference.com/w/cpp/string/basic_string/assign). Discuss and spec out a version of the overload set that fits more to the Qt ecosystem.
E.g.
- look at QString/QByteArray existing ctors
- consider assignment from views
- just take views
- or anything implicitly-convertible to them, like STL does
- cf.
QTBUG-105389for how to implement something like this
- cf.
- we probably don't want the implicit subsetting versions
Acceptance criteria:
- one assign() overload set for each of QString and QByteArray is agreed upon
- overload set contains at least std::vector's overloads (https://en.cppreference.com/w/cpp/container/vector/assign)
- document rationale for deviations from std::string's overload set (https://en.cppreference.com/w/cpp/string/basic_string/assign)
Attachments
Issue Links
- blocks
-
QTBUG-106198 QString: add missing STL-style assign()
- Open
-
QTBUG-106199 QByteArray: add missing STL-style assign()
- Open