Boost logo

Boost Users :

Subject: [Boost-users] [tuple][hash] Hashing a tuple question
From: Chris Hite (C.Hite_at_[hidden])
Date: 2009-07-01 12:27:47


The code using fusion::fold is elegant, but you still have to define a
functor before using it.

Couldn't boost just define a default hasher for tuple like the default
comparison <boost/tuple/tuple_comparison.hpp>?

I've got a tuple with 3 ints in it. I can compare them for free. Why
can't I just hash them for free?

All we'd have to do is define a hash_value function for tuple that calls
fold.


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