Google sparsehash and Qt::Handle on Mac Os X

Cédric PASTEUR cedric.pasteur.2006 at polytechnique.org
Tue Dec 23 15:42:11 UTC 2008


Hi,I'm trying to compile KDevelop on Mac OS X.
I have a problem with DUChain and it's use of dense_hash_map with Key ==
Qt::HANDLE, which corresponds to a void* on Mac OS X (and an unsigned int on
Linux).
But there is no hash<void*> in STL hash_fun.h

The fix I found was to add a template specialization;

template<>

    struct hash<void*>

    {

size_t

operator()(void* __x) const

{ return (unsigned long)__x; }

    };


in hash_fun.h


Is it the right way to fix this?


Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20081223/ab12a98f/attachment.html>


More information about the KDevelop-devel mailing list