micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::detail::comparable Concept Reference

Concept satisfied when two operands can be compared by the comparator selected by Op. More...

#include <detail-inlines.h>

Concept definition

template<comparison Op, class Lhs_T, class Rhs_T>
Concept satisfied when two operands can be compared by the comparator selected by Op.
Satisfied if the comparison selected by Op of two const objects is well-formed.
Concept satisfied by two pointers, one of which points to a function.
Concept satisfied by two integer types of different signedness.
unwrapped_t< decltype(detail::as_operand(std::declval< T >()))> comparison_operand_t
The type with which an operand of a comparator is compared.

Detailed Description

The comparison is the one made by the apply() function of the comparison tag: by value for the integers of different signedness (see sign_mixed_integers), otherwise with the operator of the language. A function pointer compared with an object pointer is also accepted (see function_pointer_pair). Used to reject the call of eq() and of the other comparators at the call site, with a short diagnostic; the operator check is the first alternative, so that the Clang diagnostic names the invalid operator and the two types first (GCC reports only that no alternative is satisfied).

Template Parameters
OpThe comparison.
Lhs_TThe type deduced for the left hand side operand.
Rhs_TThe type deduced for the right hand side operand.

Definition at line 507 of file detail-inlines.h.