Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
5
-
Foundation Sprint 117, Foundation Sprint 118, Foundation Sprint 119, Foundation Sprint 120
Description
Our best functionality currently to insert-if-not-already-exists and then know about it is something along the lines of
oldsize = hash.size();
auto &obj = hash[key];
if (oldsize != hash.size())
obj = ...;
This is because none of our current functionality returns any indication whether there was a new insertion or not. With tryEmplace/try_emplace we can get this.
Attachments
Issue Links
- blocks
-
QTBUG-130259 QHash: Find and port various code from insert-if-not-already-exists to use try_emplace
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-130258 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
536559,22 | Add QHash::emplaceUnique/try_emplace | dev | qt/qtbase | Status: NEW | -1 | +1 |