It seems that the size of the corresponding array in the code has a one-off
error. This is now fixed.
The end of the array passed to lower_bound is wrong because the
hard-coded size is size + 1. However, the end is array + size. This is
what lower_bound expects from an array. Or any other algorithm for that
matter expecting the end of a container as an argument.
This can cause issues with something like lower_bound because a
potential "empty" fill is not sorted as lower_bound would expect the
data structure.
It could have been fixed by decreasing the size by one, however it is a more
future-proof solution to avoid hard-coding the size and just use
std::size(array) instead.
Pick-to: 5.15 6.2 6.3
Change-Id: I1d25a5b1a80a3b2634b229e0718108ad5e7808a0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>