In C++20 performs three-way lexicographical comparison of elements of two SBO vectors.
- Template Parameters
-
ValueTypeLeft | A type of an element of the first vector. |
sbo_threshold_left | A maximal number of elements stored in stack associated with the first vector. |
AllocatorLeft | A type of an allocator used by the first vector. |
ValueTypeRight | A type of an element of the second vector. |
sbo_threshold_right | A maximal number of elements stored in stack associated with the second vector. |
AllocatorRight | A type of an allocator used by the second vector. |
- Parameters
-
left | The first vector. |
right | The second vector. |
- Returns
- The return type is the same as one returned by the 3-way comparison of elements of the vectors. The return value is determined by a lexicographical comparison of vector elements: the first pair of unequal elements of the vectors, as determined by three-way comparison applied to the pair, define the same return value of the vector comparison. If there is no such pair, i.e. elements of the vectors are not pairwise equal, then, if sizes of the vectos match, the vector comparison returns
equivalent
(of the respective ordering type). Otherwise, the shorter vector is considered smaller.