xtd 0.2.0
equator.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
6#include "../../../internal/__polymorphic_equator.hpp"
7#undef __XTD_CORE_INTERNAL__
8
10namespace xtd {
12 namespace collections {
14 namespace generic {
16 namespace helpers {
37 template<class key_t>
38 struct equator {
40
43 using first_argument_type = key_t;
45 using second_argument_type = key_t;
47 using result_type = bool;
49
51
59 if (&a == &b) return true;
60 return __polymorphic_equator__<first_argument_type, typename std::is_polymorphic<first_argument_type>::type> {}(a, b);
61 }
63 };
64 }
65 }
66 }
67}
@ a
The A key.
@ b
The B key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Implements a function object for performing comparisons. Unless specialised, invokes operator== on ty...
Definition equator.hpp:38
bool result_type
Represents the result type.
Definition equator.hpp:47
key_t first_argument_type
Represents the first argument type.
Definition equator.hpp:43
result_type operator()(const first_argument_type &a, const second_argument_type &b) const
checks if the specified a and b keys are equal.
Definition equator.hpp:58
key_t second_argument_type
Represents the second argument type.
Definition equator.hpp:45