Skip to main content

The lt_ Struct Template Reference

Less than comparator struct template. More...

Declaration

template <class Lhs_T, class Rhs_T>
struct micro_os_plus::micro_test_plus::detail::lt_<Lhs_T, Rhs_T>

Included Headers

Public Constructors Index

template <class Lhs_T, class Rhs_T>
constexprlt_ (const Lhs_T &lhs={}, const Rhs_T &rhs={})

Constructs a less than comparator for the given operands. More...

Public Operators Index

template <class Lhs_T, class Rhs_T>
constexproperator bool () const

Conversion operator to boolean. More...

Public Member Functions Index

template <class Lhs_T, class Rhs_T>
constexpr autolhs (void) const

Retrieves the left-hand operand. More...

template <class Lhs_T, class Rhs_T>
constexpr autorhs (void) const

Retrieves the right-hand operand. More...

Private Member Attributes Index

template <class Lhs_T, class Rhs_T>
const Lhs_Tlhs_ {}

Stores the left-hand operand. More...

template <class Lhs_T, class Rhs_T>
const Rhs_Trhs_ {}

Stores the right-hand operand. More...

template <class Lhs_T, class Rhs_T>
const boolvalue_ {}

Stores the result of the less than comparison. More...

Description

Less than comparator struct template.

Template Parameters
Lhs_TThe type of the left-hand operand.
Rhs_TThe type of the right-hand operand.

The lt_ struct template provides a type-safe mechanism for evaluating whether the left-hand operand is less than the right-hand operand within the framework.

This comparator supports a variety of operand types, including those with static values and generic types. For types with static values, the comparison is performed directly. For all other types, the generic getter is used to retrieve and compare the values.

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 folder to maintain a structured and modular codebase.

Definition at line 884 of file detail.h.

Public Constructors

lt_()

template <class Lhs_T, class Rhs_T>
micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lt_ (const Lhs_T & lhs={}, const Rhs_T & rhs={})
inlineconstexpr

Constructs a less than comparator for the given operands.

Parameters
lhsThe left-hand operand.
rhsThe right-hand operand.

Evaluates whether the left-hand operand is less than the right-hand operand at construction, supporting static values and generic types. The result is stored in the value_ member for efficient access.

Definition at line 897 of file detail.h.

Public Operators

operator bool()

template <class Lhs_T, class Rhs_T>
micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::operator bool () const
inlinenodiscardconstexpr

Conversion operator to boolean.

Parameters

None.

Return Values
trueThe left-hand operand is less than the right-hand operand.
falseOtherwise.

Returns the result of the less than comparison.

Definition at line 940 of file detail.h.

Public Member Functions

lhs()

template <class Lhs_T, class Rhs_T>
auto micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lhs (void) const
inlinenodiscardconstexpr

Retrieves the left-hand operand.

Parameters

None.

Returns

The extracted left-hand operand.

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

Definition at line 958 of file detail.h.

rhs()

template <class Lhs_T, class Rhs_T>
auto micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::rhs (void) const
inlinenodiscardconstexpr

Retrieves the right-hand operand.

Parameters

None.

Returns

The extracted right-hand operand.

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

Definition at line 976 of file detail.h.

Private Member Attributes

lhs_

template <class Lhs_T, class Rhs_T>
const Lhs_T micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lhs_ {}

Stores the left-hand operand.

Definition at line 985 of file detail.h.

rhs_

template <class Lhs_T, class Rhs_T>
const Rhs_T micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::rhs_ {}

Stores the right-hand operand.

Definition at line 990 of file detail.h.

value_

template <class Lhs_T, class Rhs_T>
const bool micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::value_ {}

Stores the result of the less than comparison.

Definition at line 995 of file detail.h.


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


Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.