//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // template , class Pred = equal_to, // class Alloc = allocator>> // class unordered_multimap // hasher hash_function() const; #include #include #include int main(int, char**) { typedef std::unordered_multimap map_type; map_type m; map_type::iterator i1 = m.insert(map_type::value_type(1, "abc")); map_type::iterator i2 = m.insert(map_type::value_type(1, "bcd")); const map_type& cm = m; assert(cm.hash_function()(i1->first) == cm.hash_function()(i2->first)); assert(cm.hash_function()(i2->first) == cm.hash_function()(i1->first)); return 0; }