https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104174
Bug ID: 104174 Summary: [12 Regression] unordered_map<const T, U, E, H> fails Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- #include <unordered_map> struct H : std::hash<int> { }; std::unordered_map<const int, int, std::equal_to<int>, H> m; In file included from /home/jwakely/gcc/12/include/c++/12.0.1/unordered_map:47, from um.C:1: /home/jwakely/gcc/12/include/c++/12.0.1/bits/unordered_map.h: In instantiation of 'class std::unordered_map<const int, int, std::equal_to<int>, H>': um.C:5:59: required from here /home/jwakely/gcc/12/include/c++/12.0.1/bits/unordered_map.h:113:49: error: no type named 'mapped_type' in 'class std::_Hashtable<const int, std::pair<const int, int>, std::allocator<std::pair<const int, int> >, std::__detail::_Select1st, H, std::equal_to<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >' 113 | typedef typename _Hashtable::mapped_type mapped_type; | ^~~~~~~~~~~ This was caused by my g:d87105d697ced10e1f7af3f1f80ef6c9890c8585