Boost logo

Boost :

From: Chris Jefferson (caj_at_[hidden])
Date: 2005-03-15 12:51:55


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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[4] ?
|
|
| I don't expect a pair< pair<int, int>, pair<int, int> > to be frequently
| refactored into an int[4]. So no, I don't think that it should
| necessarily have the same hash value as an int[4]. 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..

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDAMeJ3FpDzErifpIRAqrVAJ4jZP0gG5DEttSIccejCW3RzuTdywCfRC5I
xaPcjBfTeA6+3sBxKMKPAk8=
=Lrj9
-----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