Skip to main content

not_equal_to Struct

Non-equality tag for compare_op. More...

Declaration​

struct micro_os_plus::micro_test_plus::detail::not_equal_to { ... }

Included Headers​

Public Static Functions Index​

template <class Lhs_T, class Rhs_T>
static constexpr boolapply (const Lhs_T &lhs, const Rhs_T &rhs)

Compares the operands with !=. More...

Public Static Attributes Index​

static constexpr const char *symbol = " != "

The operator symbol, as displayed in the failure reports. More...

static constexpr boolwithin_tolerance_result = false

Deprecated result when the operands are within the tolerance. More...

Description​

Non-equality tag for compare_op.

Defines the operator applied by compare_op, its symbol in the failure reports, and the result when the operands are within the tolerance of the floating-point wrappers.

Definition at line 500 of file detail.h.

Public Static Functions​

apply()​

template <class Lhs_T, class Rhs_T>
bool micro_os_plus::micro_test_plus::detail::not_equal_to::apply (const Lhs_T & lhs, const Rhs_T & rhs)
nodiscard constexpr static

Compares the operands with !=.

Always inlined, also at -O0, so that the debug builds do not get one more function for each combination of operand types.

Template Parameters
Lhs_T

The type of the left-hand operand.

Rhs_T

The type of the right-hand operand.

Parameters
lhs

The left-hand operand.

rhs

The right-hand operand.

Returns

The result of lhs != rhs, converted to bool.

The using-declarations make the standard operators visible to unqualified lookup, in addition to those found by argument-dependent lookup; operator== is also needed for the C++20 rewritten candidates of !=.

Declaration at line 546 of file detail.h, definition at line 631 of file detail-inlines.h.

631 constexpr bool
632 not_equal_to::apply (const Lhs_T& lhs, const Rhs_T& rhs)
633 {
634 using std::operator==;
635 using std::operator!=;
637 {
638 return std::cmp_not_equal (as_comparison_integer (lhs),
640 }
641 else
642 {
643 return lhs != rhs;
644 }

Reference micro_os_plus::micro_test_plus::detail::as_comparison_integer.

Public Static Attributes​

symbol​

const char* micro_os_plus::micro_test_plus::detail::not_equal_to::symbol = " != "
constexpr static

The operator symbol, as displayed in the failure reports.

Includes the surrounding spaces, so that the formatter appends it with a single call; a C string, not a std::string_view, which would take two registers at each call site and enlarge the code.

Definition at line 510 of file detail.h.

510 static constexpr const char* symbol = " != ";

The documentation for this struct was generated from the following files:


Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.