5#define __XTD_STD_INTERNAL__
7#undef __XTD_STD_INTERNAL__
27 template<
typename type_t,
typename comparable_t>
37 friend bool operator <(
const type_t& lhs,
const type_t& rhs)
noexcept {
39 return dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) < 0;
46 friend bool operator <=(
const type_t& lhs,
const type_t& rhs)
noexcept {
48 return dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) <= 0;
55 friend bool operator >(
const type_t& lhs,
const type_t& rhs)
noexcept {
57 return dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) > 0;
64 friend bool operator >=(
const type_t& lhs,
const type_t& rhs)
noexcept {
66 return dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) >= 0;
69#if defined(__xtd__cpp_lib_three_way_comparison)
77 friend std::strong_ordering
operator <=>(
const type_t& lhs,
const type_t& rhs)
noexcept {
79 if (
dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) < 0)
return std::strong_ordering::less;
80 if (
dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) > 0)
return std::strong_ordering::greater;
81 if (
dynamic_cast<const type_t*
>(rhs_ptr) && lhs.compare_to(
static_cast<const type_t&
>(rhs)) == 0)
return std::strong_ordering::equivalent;
82 return std::strong_ordering::less;
Contains __xtd_std_version definitions.
Internal comparable operators definition.
Definition comparison_operators.hpp:28
friend std::strong_ordering operator<=>(const type_t &lhs, const type_t &rhs) noexcept
Three-way comparison operator with specidied lhs ans rhs values.
Definition comparison_operators.hpp:77
friend bool operator<(const type_t &lhs, const type_t &rhs) noexcept
Less than comparison operator with specidied lhs ans rhs values.
Definition comparison_operators.hpp:37
friend bool operator>=(const type_t &lhs, const type_t &rhs) noexcept
Less than comparison operator with specidied lhs ans rhs values.
Definition comparison_operators.hpp:64
friend bool operator<=(const type_t &lhs, const type_t &rhs) noexcept
Less than or equal to comparison operator with specidied lhs ans rhs values.
Definition comparison_operators.hpp:46
friend bool operator>(const type_t &lhs, const type_t &rhs) noexcept
Greater than or equal to comparison operator with specidied lhs ans rhs values.
Definition comparison_operators.hpp:55
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10