Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-12-04 13:23:12


Boris Mansencal wrote:

> std::tr1::unordered_map<point, myType, ptHasher>
> map_point_to_myType(10, ptHasher(height));
>
> Is there any drawback to do things like that ?
> Is there any portability issue ?

I can't think of any; this seems to be a good way. For p.y() in 0 ..
height-1, you hash function is now "perfect", that is, hash( p1 ) != hash(
p2 ) when p1 != p2.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net