Home | History | Annotate | Download | only in support

Lines Matching full:hash

25 // Test that the specified Hash meets the requirements of an enabled hash
26 template <class Hash, class Key, class InputKey = Key>
31 return test_hash_enabled<std::hash<T>, T, InputKey>(key);
34 // Test that the specified Hash meets the requirements of a disabled hash.
35 template <class Hash, class Key>
40 return test_hash_disabled<std::hash<T>, T>();
49 // Each header that declares the template hash provides enabled
50 // specializations of hash for nullptr t and all cv-unqualified
92 // Test that each of the library hash specializations for arithmetic types,
131 template <class Hash, class Key, class InputKey>
135 static_assert(std::is_destructible<Hash>::value, "");
136 // Enabled hash requirements
137 static_assert(std::is_default_constructible<Hash>::value, "");
138 static_assert(std::is_copy_constructible<Hash>::value, "");
139 static_assert(std::is_move_constructible<Hash>::value, "");
140 static_assert(std::is_copy_assignable<Hash>::value, "");
141 static_assert(std::is_move_assignable<Hash>::value, "");
144 static_assert(std::is_swappable<Hash>::value, "");
146 static_assert(std::__is_swappable<Hash>::value, "");
151 static_assert(can_hash<Hash(Key&)>(), "");
152 static_assert(can_hash<Hash(Key const&)>(), "");
153 static_assert(can_hash<Hash(Key&&)>(), "");
154 static_assert(can_hash<Hash const&(Key&)>(), "");
155 static_assert(can_hash<Hash const&(Key const&)>(), "");
156 static_assert(can_hash<Hash const&(Key&&)>(), "");
158 static_assert(can_hash<Hash(ConvertibleToSimple<Key>&)>(), "");
159 static_assert(can_hash<Hash(ConvertibleToSimple<Key> const&)>(), "");
160 static_assert(can_hash<Hash(ConvertibleToSimple<Key>&&)>(), "");
162 static_assert(can_hash<Hash(ConvertibleTo<Key>&)>(), "");
163 static_assert(can_hash<Hash(ConvertibleTo<Key> const&)>(), "");
164 static_assert(can_hash<Hash(ConvertibleTo<Key> &&)>(), "");
165 static_assert(can_hash<Hash(ConvertibleTo<Key> const&&)>(), "");
167 const Hash h{};
172 template <class Hash, class Key>
176 // Disabled hash requirements
177 static_assert(!std::is_default_constructible<Hash>::value, "");
178 static_assert(!std::is_copy_constructible<Hash>::value, "");
179 static_assert(!std::is_move_constructible<Hash>::value, "");
180 static_assert(!std::is_copy_assignable<Hash>::value, "");
181 static_assert(!std::is_move_assignable<Hash>::value, "");
185 typename std::remove_reference<Hash>::type
191 static_assert(!can_hash<Hash(Key&)>(), "");
192 static_assert(!can_hash<Hash(Key const&)>(), "");
193 static_assert(!can_hash<Hash(Key&&)>(), "");
194 static_assert(!can_hash<Hash const&(Key&)>(), "");
195 static_assert(!can_hash<Hash const&(Key const&)>(), "");
196 static_assert(!can_hash<Hash const&(Key&&)>(), "");
198 static_assert(!can_hash<Hash(ConvertibleToSimple<Key>&)>(), "");
199 static_assert(!can_hash<Hash(ConvertibleToSimple<Key> const&)>(), "");
200 static_assert(!can_hash<Hash(ConvertibleToSimple<Key>&&)>(), "");
202 static_assert(!can_hash<Hash(ConvertibleTo<Key>&)>(), "");
203 static_assert(!can_hash<Hash(ConvertibleTo<Key> const&)>(), "");
204 static_assert(!can_hash<Hash(ConvertibleTo<Key> &&)>(), "");
205 static_assert(!can_hash<Hash(ConvertibleTo<Key> const&&)>(), "");
237 static void apply() { test_hash_enabled<std::hash<Type>, Type>(); }