id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7489,No hash function for classes containing conversion operation to ordinary type,Robert Luberda ,Daniel James,"Hi It seems boost::hash no longer supports calculating hashes for classes that are convertible to int. It used to work with previous versions of boost::hash Please see the following example (based on example from bug#7437), which compiles fine with boost::hash up to version 1.50, but fails to compile with boost 1.51 {{{ #include class MyClass { public: MyClass(int i=0): v(i) {} operator int() const {return v;} private: int v; }; typedef boost::unordered_map MyMap; int main(int argc, char* argv[]) { MyMap m; MyMap::value_type v(MyClass(1),""apples""); m.insert(v); return 0; } }}} The error is: {{{ /opt//boost_1_51_0/include/boost/functional/hash/extensions.hpp:257: error: no matching function for call to 'hash_value(const MyClass&)' }}} ",Bugs,closed,To Be Determined,hash,Boost 1.51.0,Problem,wontfix,,