File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change
1
+ ``` @meta
2
+ DocTestSetup = :(using StructArrays)
3
+ ```
1
4
# Some counterintuitive behaviors
2
5
3
6
When created from parent arrays representing each field of the final ` struct ` , StructArrays creates a "view" which
@@ -13,7 +16,7 @@ These issues are elucidated below.
13
16
14
17
For this demonstration, throughout we'll use this mutable struct:
15
18
16
- ``` jldoctest counter1; setup=:(using StructArrays)
19
+ ``` jldoctest counter1
17
20
julia> mutable struct Foo{T}
18
21
a::T
19
22
b::T
@@ -181,7 +184,7 @@ None of the changes to `soa` "propagated" to `aos`. This is because a StructArra
181
184
## Broadcasted assignment for array entries
182
185
183
186
Broadcasted in-place assignment can also behave counterintuitively for StructArrays.
184
- ``` jldoctest; setup=:(using StructArrays)
187
+ ``` jldoctest
185
188
julia> using StaticArrays # for FieldVector
186
189
187
190
julia> mutable struct Bar{T} <: FieldVector{2,T}
You can’t perform that action at this time.
0 commit comments