[Development] QUtf8String{, View}

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon May 25 19:02:32 CEST 2020

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.dangelo at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200525/d1108ff7/attachment-0001.bin>

More information about the Development mailing list