Functors and allocations

foo is an abstract type.
To avoid the allocation, set the type of modelparameters.bar to foo{Float64} or parameterize the modelparameters type.

4 Likes