PrevUpHomeNext

utx::eq, utx::ne, utx::lt, utx::gt, utx::le, utx::ge


utx::eq

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool eq(const T & x, const U & y);

utx::ne

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool ne(const T & x, const U & y);

utx::lt

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool lt(const T & x, const U & y);

utx::gt

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool gt(const T & x, const U & y);

utx::le

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool le(const T & x, const U & y);

utx::ge

template <utx::kspt::real_number T, utx::kspt::real_number U>
inline constexpr bool ge(const T & x, const U & y);

Example

#include <utxcpp/core.hpp>

int main() {
	constexpr utx::u64 x = 123;
	constexpr utx::i32 y = 123;
	constexpr utx::f32 z = 123;
	constexpr utx::f64 w = utx::numbers::pi;

	static_assert(utx::eq(x, y));
	static_assert(utx::eq(x, z));
	static_assert(utx::le(x, y));
	static_assert(utx::ge(x, z));

	static_assert(utx::ne(x, w));

	static_assert(utx::lt(w, x));
	static_assert(utx::le(w, y));
	static_assert(utx::gt(z, w));
	static_assert(utx::ge(z, w));
}

Last revised: June 13, 2022 at 03:08:21 GMT


PrevUpHomeNext