I remember to ask a similar question. I was told that it is not supported. Finally I reconsidered my design, which was more optimal at all. On the other hand, it is not said that hash works optimal in that case. You might better do a lexicographical_compare to the keys and find first one of the keys from the set, as to hash all and look-up for hash values. Therefore a multi-map or multi-set as part of your multi-index might be a better choice. Otherwise, you need to hash all possible tuple combinations, which is an NP-complete problem.
There is a nice article in Dr.Dobb's on what is more efficient hash based container or stl::set or map.
http://www.ddj.com/cpp/198800559?pgno=1
Hope that helps,
Regards,
Ovanes
Either you misunderstand me or I misunderstand you. :) The hash value would be created for the entire vector? I want to use a string in the vector as a key, not the entire vector itself. If an employee has the names Tom and John I want to find the employee also if I only search for Tom. There would be one employee object in the container but two hash values would need to be generated. Not sure if this is possible at all?
Boris
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users