array_operand Struct Template
An array operand of a comparator, other than a character array. More...
Declaration
struct micro_os_plus::micro_test_plus::detail::array_operand<T> { ... }
Included Headers
Public Constructors Index
template <class T> | |
| constexpr | array_operand (const T *first, std::size_t count) noexcept |
|
Constructs the operand from the first element and the size of an array. More... | |
Public Member Functions Index
template <class T> | |
| constexpr const T * | begin (void) const noexcept |
|
Returns an iterator to the first element. More... | |
template <class T> | |
| constexpr const T * | end (void) const noexcept |
|
Returns an iterator past the last element. More... | |
Private Member Attributes Index
template <class T> | |
| std::size_t | count_ |
|
The number of elements. More... | |
template <class T> | |
| const T * | first_ |
|
The first element. More... | |
Description
An array operand of a comparator, other than a character array.
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.
- Template Parameters
-
T The element type, possibly const.
Definition at line 1845 of file detail.h.
Public Constructors
array_operand()
| constexpr noexcept |
Constructs the operand from the first element and the size of an array.
- Parameters
-
first The first element of the array.
count The number of elements of the array.
Stores the pointer and the count; nothing is copied.
Declaration at line 1854 of file detail.h, definition at line 1627 of file detail-inlines.h.
Reference micro_os_plus::micro_test_plus::detail::array_operand< T >::first_.
Public Member Functions
begin()
| nodiscard constexpr noexcept |
Returns an iterator to the first element.
- Parameters
None.
- Returns
A pointer to the first element.
Returns the stored pointer.
Declaration at line 1864 of file detail.h, definition at line 1639 of file detail-inlines.h.
Reference micro_os_plus::micro_test_plus::detail::array_operand< T >::first_.
Referenced by micro_os_plus::micro_test_plus::detail::operator<=> and micro_os_plus::micro_test_plus::detail::operator==.
end()
| nodiscard constexpr noexcept |
Returns an iterator past the last element.
- Parameters
None.
- Returns
A pointer past the last element.
Returns the pointer past the last element.
Declaration at line 1874 of file detail.h, definition at line 1658 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::array_operand< T >::count_ and micro_os_plus::micro_test_plus::detail::array_operand< T >::first_.
Referenced by micro_os_plus::micro_test_plus::detail::operator<=> and micro_os_plus::micro_test_plus::detail::operator==.
Private Member Attributes
count_
|
The number of elements.
The extent of the array passed to the comparator.
Definition at line 1891 of file detail.h.
Referenced by micro_os_plus::micro_test_plus::detail::array_operand< T >::end.
first_
|
The first element.
Not owned; points into the array passed to the comparator.
Definition at line 1883 of file detail.h.
Referenced by micro_os_plus::micro_test_plus::detail::array_operand< T >::array_operand, micro_os_plus::micro_test_plus::detail::array_operand< T >::begin and micro_os_plus::micro_test_plus::detail::array_operand< T >::end.
The documentation for this struct was generated from the following files:
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.