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+ ```
14# Some counterintuitive behaviors
25
36When 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.
1316
1417For this demonstration, throughout we'll use this mutable struct:
1518
16- ``` jldoctest counter1; setup=:(using StructArrays)
19+ ``` jldoctest counter1
1720julia> mutable struct Foo{T}
1821 a::T
1922 b::T
@@ -181,7 +184,7 @@ None of the changes to `soa` "propagated" to `aos`. This is because a StructArra
181184## Broadcasted assignment for array entries
182185
183186Broadcasted in-place assignment can also behave counterintuitively for StructArrays.
184- ``` jldoctest; setup=:(using StructArrays)
187+ ``` jldoctest
185188julia> using StaticArrays # for FieldVector
186189
187190julia> mutable struct Bar{T} <: FieldVector{2,T}
You can’t perform that action at this time.
0 commit comments