1 Dec
2011
1 Dec
'11
3:10 p.m.
Kelvin Chung wrote:
// It would be nice to have a template that does this so I don't have to do this for every leaf class std::size_t hash_value(const Foo1& foo1) { return foo1.hash(); }
You don't need to define hash_value for the leaf classes, only for the base class. std::size_t hash_value(const Foo& foo) { return foo.hash(); }