9 template<
typename type_t>
26 virtual bool equals(
const type_t&)
const noexcept = 0;
30 friend bool operator ==(
const type_t&
a,
const type_t&
b) noexcept {
return a.equals(b);}
31 friend bool operator !=(
const type_t& a,
const type_t& b) noexcept {
return !a.equals(b);}
32 template<
typename object_t>
33 friend bool operator ==(
const type_t& a,
const iequatable<object_t>& b) noexcept {
return dynamic_cast<const type_t*
>(&
b) && a.equals(dynamic_cast<const type_t&>(b));}
34 template<
typename object_t>
35 friend bool operator !=(
const type_t& a,
const iequatable<object_t>& b) noexcept {
return !
dynamic_cast<const type_t*
>(&
b) || !a.equals(dynamic_cast<const type_t&>(b));}
virtual bool equals(const type_t &) const noexcept=0
Indicates whether the current object is equal to another object of the same type. ...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::interface interface.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
#define interface_
This keyword is use to represent an interface.
Definition: interface.h:54