template<typename type_t>
class xtd::iequatable< type_t >
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
- Namespace
- xtd
- Library
- xtd.core
- Examples
- The following example shows how to use xtd::iequatable interface.
#include <xtd/console>
#include <xtd/iequatable>
public:
explicit foo(int value) : value_ {value} {}
bool equals(const foo& value) const noexcept override {return value_ == value.value_;}
private:
int value_ = 0;
};
auto main() -> int {
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
- Examples
- generic_icollection.cpp, generic_ienumerable2.cpp, generic_ienumerator.cpp, generic_ilist.cpp, generic_list.cpp, generic_list4.cpp, hash_code.cpp, ienumerable.cpp, ienumerator.cpp, iequatable.cpp, object_and_iequatable.cpp, and sprintf_class.cpp.