[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / containers / unord / unord.set / find_non_const.transparent.pass.cpp
blob7fa3508ae09e2a39c5ffb5baa3c4ec65581a3137
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <unordered_set>
11 // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
12 // class Alloc = allocator<pair<const Key, T>>>
13 // class unordered_set
15 // template <typename K>
16 // iterator find(const K& k);
18 // UNSUPPORTED: c++03, c++11, c++14, c++17
20 #include <unordered_set>
22 #include "test_transparent_unordered.h"
24 int main(int, char**)
26 using key_type = StoredType<int>;
29 // Make sure conversions don't happen for transparent non-final hasher and key_equal
30 using set_type = unord_set_type<std::unordered_set, transparent_hash,
31 std::equal_to<> >;
32 test_transparent_find<set_type>(key_type{1}, key_type{2});
36 // Make sure conversions don't happen for transparent final hasher and key_equal
37 using set_type = unord_set_type<std::unordered_set, transparent_hash_final,
38 transparent_equal_final>;
39 test_transparent_find<set_type>(key_type{1}, key_type{2});
43 // Make sure conversions do happen for non-transparent hasher
44 using set_type = unord_set_type<std::unordered_set, non_transparent_hash,
45 std::equal_to<> >;
46 test_non_transparent_find<set_type>(key_type{1}, key_type{2});
50 // Make sure conversions do happen for non-transparent key_equal
51 using set_type = unord_set_type<std::unordered_set, transparent_hash,
52 std::equal_to<key_type> >;
53 test_non_transparent_find<set_type>(key_type{1}, key_type{2});
57 // Make sure conversions do happen for both non-transparent hasher and key_equal
58 using set_type = unord_set_type<std::unordered_set, non_transparent_hash,
59 std::equal_to<key_type> >;
60 test_non_transparent_find<set_type>(key_type{1}, key_type{2});
63 return 0;