//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template , class Pred = equal_to, // class Alloc = allocator>> // class unordered_map // http://llvm.org/bugs/show_bug.cgi?id=16538 // http://llvm.org/bugs/show_bug.cgi?id=16549 #include struct Key { template Key(const T&) {} bool operator== (const Key&) const { return true; } }; namespace std { template <> struct hash { size_t operator()(Key const &) const {return 0;} }; } int main() { std::unordered_map::iterator it = std::unordered_map().find(Key(0)); std::pair::iterator, bool> result = std::unordered_map().insert(std::make_pair(Key(0), 0)); }