We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Base.copymutable
1 parent 72d2bd3 commit d419e21Copy full SHA for d419e21
src/sort.jl
@@ -38,12 +38,12 @@ end
38
39
40
@inline _sort(a::StaticVector, alg, order) =
41
- similar_type(a)(sort!(Base.copymutable(a); alg=alg, order=order))
+ similar_type(a)(sort!(copyto!(similar(a), a); alg=alg, order=order))
42
43
@inline _sort(a::StaticVector, alg::BitonicSortAlg, order) =
44
similar_type(a)(_sort(Tuple(a), alg, order))
45
46
-_sort(a::NTuple, alg, order) = sort!(Base.copymutable(a); alg=alg, order=order)
+_sort(a::NTuple, alg, order) = sort!(collect(a); alg=alg, order=order)
47
48
# Implementation loosely following
49
# https://www.inf.hs-flensburg.de/lang/algorithmen/sortieren/bitonic/oddn.htm
0 commit comments