Skip to content

Commit 82ff2b0

Browse files
authored
Fix radix sort on Julia 1.7 (#46)
1 parent 61ae963 commit 82ff2b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SortingAlgorithms.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ function sort!(vs::AbstractVector, lo::Int, hi::Int, ::RadixSortAlg, o::Ordering
123123
end
124124

125125
function Base.Sort.Float.fpsort!(v::AbstractVector, ::RadixSortAlg, o::Ordering)
126-
lo, hi = Base.Sort.Float.nans2end!(v,o)
126+
@static if VERSION >= v"1.7.0-DEV"
127+
lo, hi = Base.Sort.Float.specials2end!(v, RadixSort, o)
128+
else
129+
lo, hi = Base.Sort.Float.nans2end!(v, o)
130+
end
127131
sort!(v, lo, hi, RadixSort, o)
128132
end
129133

0 commit comments

Comments
 (0)