On Friday 24 April 2015 14:32:22 Gunnar Sletta wrote:
> > While implementing qHash() overloads for gui/math3d classes,
> 
> Why are we doing this? a QHash<QMatrix4x4, T> makes very little sense me..

Well, there are are bug reports asking for qHash(QPoint), so it seems to make 
sense to _someone_ :)

Esp. for types that don't have a natural total order (=most), and thus don't / 
shouldn't have operator<, adding a qHash() overload, as long as it can be done 
(it can't for QPointF) is the only way to enable associative containers of any 
kind for that type.

Thanks,
Marc

-- 
Marc Mutz <marc.m...@kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to