xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <icomparable.h>
Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method.
Inherits xtd::interface.
Public Member Functions | |
virtual int32_t | compare_to (const object &obj) const noexcept |
Compares the current instance with another object of the same type. | |
virtual int32_t | compare_to (const type_t &obj) const noexcept=0 |
Compares the current instance with another object of the same type. | |
|
inlinevirtualnoexcept |
Compares the current instance with another object of the same type.
obj | An object to compare with this instance. |
Value | Condition |
---|---|
Less than zero | This instance is less than obj. |
Zero | This instance is equal to obj. |
Greater than zero | This instance is greater than obj. |
Reimplemented in xtd::guid, and xtd::version.
|
pure virtualnoexcept |
Compares the current instance with another object of the same type.
obj | An object to compare with this instance. |
Value | Condition |
---|---|
Less than zero | This instance is less than obj. |
Zero | This instance is equal to obj. |
Greater than zero | This instance is greater than obj. |
Implemented in xtd::guid, and xtd::version.