not_ Struct Template
Logical NOT comparator struct template. More...
Declaration
struct micro_os_plus::micro_test_plus::detail::not_<T> { ... }
Included Headers
Base struct
| struct | unary_op_<T> |
|
Common base struct template for unary comparators. More... | |
Public Constructors Index
template <class T> | |
| constexpr | not_ (const T &t={}) |
|
Constructs a logical NOT comparator for the given operand. More... | |
Public Operators Index
template <class T> | |
| constexpr | operator bool () const |
|
Conversion operator to boolean. More... | |
Public Member Functions Index
template <class T> | |
| constexpr auto | operand () const |
|
Retrieves the wrapped operand expression. More... | |
Private Member Attributes Index
template <class T> | |
| const T | t_ {} |
|
Stores the operand. More... | |
template <class T> | |
| const bool | value_ {} |
|
Stores the result of the operation. More... | |
Description
Logical NOT comparator struct template.
Derived from unary_op_, this struct negates a single sub-expression, enabling test writers to assert that a condition does not hold. The negation result is computed at construction time, ensuring consistent reporting throughout the assertion framework.
- Template Parameters
-
T The type of the operand.
Definition at line 566 of file detail.h.
Public Constructors
not_()
| explicit constexpr |
Constructs a logical NOT comparator for the given operand.
- Parameters
-
t The operand to be negated.
Evaluates the logical negation not static_cast<bool>(t) and passes the result to the unary_op_ base class constructor.
Declaration at line 573 of file detail.h, definition at line 511 of file detail-inlines.h.
Reference micro_os_plus::micro_test_plus::detail::unary_op_< T >::unary_op_.
Public Operators
operator bool()
| nodiscard constexpr |
Conversion operator to boolean.
- Parameters
None.
- Returns
The result of the operation.
Returns the pre-computed boolean result stored by the derived comparator's constructor.
Declaration at line 180 of file detail.h, definition at line 109 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::unary_op_< T >::unary_op_ and micro_os_plus::micro_test_plus::detail::unary_op_< T >::value_.
Public Member Functions
operand()
| nodiscard constexpr |
Retrieves the wrapped operand expression.
- Parameters
None.
- Returns
The extracted operand value.
Returns the wrapped operand, applying the generic getter to ensure correct extraction for both custom and standard types.
Declaration at line 190 of file detail.h, definition at line 121 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::get and micro_os_plus::micro_test_plus::detail::unary_op_< T >::t_.
Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<.
Private Member Attributes
t_
|
Stores the operand.
Definition at line 196 of file detail.h.
Referenced by micro_os_plus::micro_test_plus::detail::unary_op_< T >::unary_op_ and micro_os_plus::micro_test_plus::detail::unary_op_< T >::operand.
value_
|
Stores the result of the operation.
Definition at line 201 of file detail.h.
Referenced by micro_os_plus::micro_test_plus::detail::unary_op_< T >::unary_op_ and micro_os_plus::micro_test_plus::detail::unary_op_< T >::operator bool.
The documentation for this struct was generated from the following files:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.