atlas
atlas copied to clipboard
Refactor `util::pack_vector_fields` to use `array::ArrayViewVariant`
This PR refactors util::pack_vector_fields
to use std::variant<ArrayViews...>
with std::visit
, as opposed to nested switch
statements to resolve the possible Value
types and Rank
values for different arrays.
I also found it beneficial to refactor array::make_view_variant
such that it produces either a variant of const
or a variant of non- const
ArrayView types.
This PR needs #220 and #224 to be merged first.