Skip to main content

compare_tag Concept

Concept satisfied by a tag that defines a custom comparator. More...

Definition​

template <class Tag_T, class Lhs_T, class Rhs_T>
concept micro_os_plus::micro_test_plus::extension::compare_tag = requires (const Lhs_T& lhs, const Rhs_T& rhs) {
      requires printable<std::remove_cvref_t<decltype (Tag_T::symbol)>>;
      { Tag_T::apply (lhs, rhs) } -> std::convertible_to<bool>;
    }

Description​

Concept satisfied by a tag that defines a custom comparator.

The tag of extension::compare_op is a structure with a static symbol, which the failure reports write between the two operands, and a static apply() member function template, which receives the operands, unwrapped, and returns the result of the comparison. The symbol must be printable, usually a const char* that includes the surrounding spaces; the result of apply() must be convertible to bool.

Template Parameters
Tag_T

The type of the tag.

Lhs_T

The type of the left hand side operand, as apply() receives it.

Rhs_T

The type of the right hand side operand, as apply() receives it.

Definition at line 456 of file extension.h.

  template<class Tag_T, class Lhs_T, class Rhs_T>
  concept compare_tag = requires (const Lhs_T& lhs, const Rhs_T& rhs) {
  requires printable<std::remove_cvref_t<decltype (Tag_T::symbol)>>;
  { Tag_T::apply (lhs, rhs) } -> std::convertible_to<bool>;
  }

Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.