|
micro-test-plus 6.0.0
µTest++ Testing Framework
|
An array operand of a comparator, other than a character array. More...
#include "micro-os-plus/micro-test-plus.h"
Public Member Functions | |
| constexpr | array_operand (const T *first, std::size_t count) noexcept |
| Constructs the operand from the first element and the size of an array. | |
| constexpr const T * | begin (void) const noexcept |
| Returns an iterator to the first element. | |
| constexpr const T * | end (void) const noexcept |
| Returns an iterator past the last element. | |
Private Attributes | |
| std::size_t | count_ |
| The number of elements. | |
| const T * | first_ |
| The first element. | |
The comparators convert the arrays of any element type except the character types (the byte buffers and the arrays of numbers) to this type (see as_operand()), so that they are compared element by element, and written as ranges, instead of being compared and written as the addresses they decay to. Two arrays of different sizes are never equal, and the elements are compared with equal_to::apply(), so integers of different signedness are compared by value.
The elements are not copied; the operand must outlive the comparison, which is always the case within a check.
| T | The element type, possibly const. |
|
constexprnoexcept |
| first | The first element of the array. |
| count | The number of elements of the array. |
Stores the pointer and the count; nothing is copied.
Definition at line 1627 of file detail-inlines.h.
References first_.
|
nodiscardconstexprnoexcept |
Returns the stored pointer.
Definition at line 1639 of file detail-inlines.h.
References first_.
Referenced by micro_os_plus::micro_test_plus::detail::operator<=>(), and micro_os_plus::micro_test_plus::detail::operator==().
|
nodiscardconstexprnoexcept |
Returns the pointer past the last element.
Definition at line 1658 of file detail-inlines.h.
References count_, and first_.
Referenced by micro_os_plus::micro_test_plus::detail::operator<=>(), and micro_os_plus::micro_test_plus::detail::operator==().
|
private |
|
private |
Not owned; points into the array passed to the comparator.
Definition at line 1883 of file detail.h.
Referenced by array_operand(), begin(), and end().