From: Chris Jefferson (caj_at_[hidden])
Date: 2005-03-15 12:51:55
-----BEGIN PGP SIGNED MESSAGE-----
Peter Dimov wrote:
| Dave Harris wrote:
|> But suppose I have pair< pair<int,int>, pair<int,int> > ? Shouldn't
|> that yield the same hash value as int ?
| I don't expect a pair< pair<int, int>, pair<int, int> > to be frequently
| refactored into an int. So no, I don't think that it should
| necessarily have the same hash value as an int. Similarly, I don't
| think that vector< vector<int> > should necessarily have the same hash
| value as its flattened vector<int> counterpart.
Just to comment on this specifically, you really, really should have a
vector<vector<int> > hash to the same value as it's flatterned
conterpart. I have previously written a program where i had a set of
vector<vector<int> >s, where when flatterned they were all the same, and
I don't think it's that uncommon..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk