> On 18 Jan 2018, at 15:12, René J.V. Bertin <rjvber...@gmail.com> wrote:
> 
> 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 does work with basic data types. It just did something else than you maybe 
expected (hashing on the value of the char * pointer, not on the string behind 
it).
> 
> It could help though if a compiler error were raised in this kind of 
> situation, would that be possible?

No, because hashing on pointer values is a completely valid use case.

Cheers,
Lars

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

Reply via email to