You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While thinking about #59260 and #57348 (and #57433) there is now a problem with BinarySearchFunc() (at least the documentation):
BinarySearchFunc works like BinarySearch, but uses a custom comparison
function. The slice must be sorted in increasing order, where "increasing" is
defined by cmp. cmp(a, b) is expected to return an integer comparing the two
parameters: 0 if a == b, a negative number if a < b and a positive number if
a > b.
"defined by cmp" is problematic after #57348, as to sort the slice both parameters
need to be of the same type as the slice elements. If code is using a cmp where E is
not T then the sort of x is not defined.
The text was updated successfully, but these errors were encountered:
While thinking about #59260 and #57348 (and #57433) there is now a problem with
BinarySearchFunc()
(at least the documentation):"defined by cmp" is problematic after #57348, as to sort the slice both parameters
need to be of the same type as the slice elements. If code is using a
cmp
whereE
isnot
T
then the sort ofx
is not defined.The text was updated successfully, but these errors were encountered: