7#if !defined(__XTD_CORE_INTERNAL__)
8#error "Do not include this file: Internal use only"
17template<
typename key_t,
typename bool_t>
18struct __object_hasher__ {};
20template<
typename key_t>
21struct __object_hasher__<key_t, std::true_type> {
22 size_t operator()(
const key_t& key)
const {
return static_cast<const xtd::object&
>(key).get_hash_code();}
25template<
typename key_t>
26struct __object_hasher__<key_t, std::false_type> {
27 size_t operator()(
const key_t& key)
const {
return std::hash<key_t> {}(key);}
30template<
typename key_t,
typename bool_t>
31struct __polymorphic_hasher__ {};
33template<
typename key_t>
34struct __polymorphic_hasher__<key_t, std::true_type> {
35 size_t operator()(
const key_t& key)
const {
return __object_hasher__<key_t, typename std::is_base_of<xtd::object, key_t>::type> {}(key);}
38template<
typename key_t>
39struct __polymorphic_hasher__<key_t, std::false_type> {
40 size_t operator()(
const key_t& key)
const {
return std::hash<key_t> {}(key);}
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42