[Development] QHash<const char*,..>

Konstantin Tokarev annulen at yandex.ru
Thu Jan 18 15:15:57 CET 2018



18.01.2018, 17:13, "René J.V. Bertin" <rjvbertin at gmail.com>:
> Hi,
>
> It took me a while to figure out why my QHash map of a const char* to something else didn't work despite containing the expected key,value combinations. I understand that the bug was in my code rather than in QHash, because the class is not designed to work with basic data types.
>
> It could help though if a compiler error were raised in this kind of situation, would that be possible?

Using pointer as key type is a valid, though may be not frequent, use case. All std containers behave the same way.

>
> thanks,
> R.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin




More information about the Development mailing list