//===----------------------------------------------------------------------===// // // 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_set // hasher hash_function() const; #include #include int main(int, char**) { typedef std::unordered_set set_type; set_type s; std::pair p = s.insert(1); const set_type& cs = s; assert(cs.hash_function()(*p.first) == cs.hash_function()(1)); assert(cs.hash_function()(1) == cs.hash_function()(*p.first)); return 0; }