7#if !defined(__XTD_CORE_INTERNAL__)
8#error "Do not include this file: Internal use only"
12#include "../iequatable.hpp"
13#include "../object.hpp"
18template<
typename type_t,
typename bool_t>
19struct __object_equtor__ {};
21template<
typename type_t>
22struct __object_equtor__<type_t, std::true_type> {
23 bool operator()(
const type_t& a,
const type_t& b)
const {
return static_cast<const xtd::object&
>(
a).equals(b);}
26template<
typename type_t>
27struct __object_equtor__<type_t, std::false_type> {
28 bool operator()(
const type_t& a,
const type_t& b)
const {
return std::equal_to<type_t> {}(
a,
b);}
31template<
typename type_t,
typename bool_t>
32struct __iequatable_equator__ {};
34template<
typename type_t>
35struct __iequatable_equator__<type_t, std::true_type> {
36 bool operator()(
const type_t& a,
const type_t& b)
const {
return static_cast<const xtd::iequatable<type_t>&
>(
a).equals(b);}
39template<
typename type_t>
40struct __iequatable_equator__<type_t, std::false_type> {
41 bool operator()(
const type_t& a,
const type_t& b)
const {
return __object_equtor__<type_t, typename std::is_base_of<xtd::object, type_t>::type> {}(
a,
b);}
44template<
class type_t,
class bool_t>
45struct __polymorphic_equator__ {};
48struct __polymorphic_equator__<type_t, std::true_type> {
49 bool operator()(
const type_t& a,
const type_t& b)
const {
return __iequatable_equator__<type_t, typename std::is_base_of<xtd::iequatable<type_t>, type_t>::type> {}(
a,
b);}
53struct __polymorphic_equator__<type_t, std::false_type> {
54 bool operator()(
const type_t& a,
const type_t& b)
const {
return std::equal_to<type_t> {}(
a,
b);}
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44