micro-test-plus 3.2.2
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::detail::not_< T > Struct Template Reference

Logical NOT comparator struct template. More...

#include <micro-os-plus/micro-test-plus.h>

Inheritance diagram for micro_os_plus::micro_test_plus::detail::not_< T >:

Public Member Functions

constexpr not_ (const T &t={})
 Constructs a logical NOT comparator for the given operand.
constexpr operator bool () const
 Conversion operator to boolean.
constexpr auto value () const
 Retrieves the value of the operand.

Public Attributes

const T t_ {}
 Stores the operand.
const bool value_ {}
 Stores the result of the logical NOT operation.

Detailed Description

template<class T>
struct micro_os_plus::micro_test_plus::detail::not_< T >
Template Parameters
TThe type of the operand.

The not_ struct template provides a type-safe mechanism for evaluating the logical negation (NOT) of an operand within the framework.

This comparator supports a wide range of operand types, applying the generic getter to ensure correct value extraction for both custom and standard types. The result of the logical NOT operation is stored in the value_ member for efficient access.

The implementation is optimised for use in embedded environments and supports both compile-time and run-time evaluation.

All definitions are intended for internal use within the framework and are implemented in the include/micro-os-plus/micro-test-plus folder to maintain a structured and modular codebase.

Definition at line 1414 of file detail.h.

Constructor & Destructor Documentation

◆ not_()

template<class T>
micro_os_plus::micro_test_plus::detail::not_< T >::not_ ( const T & t = {})
inlineexplicitconstexpr
Parameters
tThe operand to be negated.

Evaluates the logical negation of the provided operand at construction, supporting both custom and standard types. The result is stored in the value_ member for efficient access.

Definition at line 1426 of file detail.h.

Member Function Documentation

◆ operator bool()

template<class T>
micro_os_plus::micro_test_plus::detail::not_< T >::operator bool ( ) const
inlinenodiscardconstexpr
Parameters
None.
Return values
trueThe operand evaluates to false.
falseThe operand evaluates to true.

Returns the result of the logical NOT operation.

Definition at line 1443 of file detail.h.

◆ value()

template<class T>
auto micro_os_plus::micro_test_plus::detail::not_< T >::value ( ) const
inlinenodiscardconstexpr
Parameters
None.
Returns
The extracted operand value.

Returns the value of the operand, applying the generic getter to ensure correct extraction for both custom and standard types.

Definition at line 1460 of file detail.h.

Member Data Documentation

◆ t_

template<class T>
const T micro_os_plus::micro_test_plus::detail::not_< T >::t_ {}

Definition at line 1468 of file detail.h.

◆ value_

template<class T>
const bool micro_os_plus::micro_test_plus::detail::not_< T >::value_ {}

Definition at line 1473 of file detail.h.


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