search for: hash_int_t

Displaying 1 result from an estimated 1 matches for "hash_int_t".

Did you mean: hash_init
2016 Dec 01
0
clang error: static_assert failed "Cache the hash code or make functors involved in hash code and bucket index computation default constructible"
Hi, Consider below test case: 1 #include <unordered_map> 2 3 using key=const int; 4 struct Myhash { 5 Myhash() = default; 6 std::hash<int> hash_int_t; 7 inline size_t operator()(const key& x) const throw() { 8 return hash_int_t(x); 9 } 10 }; 11 std::unordered_map<key,int, Myhash> mm; It compile with gcc (version 4.8.4) whereas I'm unable to compile same with clang. Clang...