Von: "Marshall Clow via Boost"
On Fri, Jan 7, 2022 at 8:16 AM Helmut Zeisel via Boost
wrote:
What I have in mind, however, (as I mentioned already ealier) is some general adapter class
template
struct array_index_adapter { ... }; that can apply different types of indices (row major, column major, triangular ...) to different containers (stack allocated, heap allocated, mixed like boost::small_vector etc).
You should look at mdspan, then. It’s been in use at various national labs for many years, and is being proposed for a future standard.
A reference implementation is here: https://github.com/kokkos/mdspan
mdspan.hpp has the implementation
detail::__compressed_pair