sign_mixed_integers Concept
Concept satisfied by two integer types of different signedness. More...
Definition
concept micro_os_plus::micro_test_plus::detail::sign_mixed_integers = std::is_integral_v<Lhs_T> and std::is_integral_v<Rhs_T>
and (not std::is_same_v<Lhs_T, bool>)
and (not std::is_same_v<Rhs_T, bool>)
and (std::is_signed_v<comparison_integer_t<Lhs_T>>
!= std::is_signed_v<comparison_integer_t<Rhs_T>>)
Description
Concept satisfied by two integer types of different signedness.
The built-in comparison of a signed and an unsigned operand converts the signed one to the unsigned type, so -1 < 1u is false. For these pairs the comparisons use the std::cmp_*() functions, which compare the mathematical values. The character types take part as the integers of the same size and signedness (see comparison_integer), since the built-in comparison of a signed char with an unsigned, or of a char32_t with an int, has the same problem. bool is excluded, since std::cmp_*() do not accept it and its comparison with integers is not a sign problem.
- Template Parameters
-
Lhs_T The type of the left operand.
Rhs_T The type of the right operand.
Definition at line 368 of file detail-inlines.h.
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.