id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7437,No hash function for enums in Boost 1.51,Steven Barbaglia ,Daniel James,"Using enums as keys in maps has become problematic in Boost 1.51. The following code compiles with Microsoft Visual C++ 2010 under Boost 1.50, but not Boost 1.51: {{{ #include class MyClass { public: enum eMyEnum { red, white, green }; }; typedef boost::unordered_map MyMap; int main(int argc, char* argv[]) { MyMap m; MyMap::value_type v(MyClass::red,""apples""); m.insert(v); return 0; } }}} An extract from the error report is: {{{ boost\functional\hash\extensions.hpp(257): error C2665: 'boost::hash_value' : none of the 2 overloads could convert all the argument types boost\functional\hash\hash.hpp(115): could be 'size_t boost::hash_value(std::type_index)' boost\functional\hash\extensions.hpp(160): or 'size_t boost::hash_value(const std::tr1::tuple<> &)' }}} ",Bugs,closed,Boost 1.52.0,hash,Boost 1.51.0,Problem,fixed,,