Il 25/05/20 17:40, Thiago Macieira ha scritto:
On Monday, 25 May 2020 04:37:26 PDT Edward Welbourne wrote:
The "comparisons" heading might stretch as far as using a UTF-8 key to
do a look-up in a QString-keyed hash,
Using UTF-8 data to look up in a QString-keyed hash will require conversion to
UTF-16 to calculate the hash. It can't be calculated on-the-fly.

Being a bit creative, one could use an unordered_map<QString, T>, and with a custom transparent hasher that hashes the (first N) code points of the key... (Requires C++20)

My 2 c,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to