xtd 0.2.0
equator.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
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 }
62
63 };
64 }
65 }
66 }
67}
Contains polymorphic_equator struct.
@ a
The A key.
Definition console_key.hpp:88
@ b
The B key.
Definition console_key.hpp:90
The xtd::collections::generic::helpers namespace contains helpers for generic collections,...
Definition allocator.hpp:14
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
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