
28 Feb
2010
28 Feb
'10
12:36 a.m.
On 27 February 2010 23:42, Aman Sinha
I want to pass in my own hash functor and comparator to an unordered_set initialization. It fails compilation on g++ 4.2.1, boost version 1.42. It’s not clear why, since a similar initialization of an STL set container seems to work fine… see below for the code and compilation failure. Any insight would be highly appreciated.
There isn't a matching constructor (I have no idea why). You need to give a minimum initial number of buckets, something like: m_unordered_set(10, foo_hash1(), foo_compare(is_gt)) Daniel