[Development] QHash iteration vs std::unordered_map
Thiago Macieira
thiago.macieira at intel.com
Sun Apr 16 17:53:52 CEST 2017
Em domingo, 16 de abril de 2017, às 08:05:21 PDT, Mark Gaiser escreveu:
> That again makes me wonder, why did Qt diverge from that?
We didn't diverge. We never had that. The Qt style predates the Standard
Library having relevance in Qt. When the first QHash-like class was added, it
was just like that.
Also remember that at the time, you wouldn't think of a Standard Library
associative container as such. It was just a sequential container that held a
std::pair, with some convenience functions for searching the first of the pair.
Returning a pair was a consequence of that. I don't know if it was intentional
thinking, or it just happened.
> And... if Qt plans to change it in Qt6?
No, cannot due to source compatibility. Ever.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list