Commit 563adeb
authored
Specialize
Julia v1.12 introduces the 2-term `map!`, where the source and the
destination are identical. Currently, this package errors without a
third term, as it can't find the source array. This PR ensures that the
method works for `StaticArrays`s.
After this,
```julia
julia> M = MVector(1,3,4)
3-element MVector{3, Int64} with indices SOneTo(3):
1
3
4
julia> map!(x->x^2, M)
3-element MVector{3, Int64} with indices SOneTo(3):
1
9
16
julia> M
3-element MVector{3, Int64} with indices SOneTo(3):
1
9
16
```map!(f, array) (#1307)1 parent 15a2672 commit 563adeb
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
0 commit comments