I'd like to have function that accepts any container of a fixed type. For a example a function that will accept both std::array<float,1>
and std::array<float,2>
.
I thought this would be possible with ranges but I'm realizing my understanding is quite superficial.
I this possible without templates?
Edit: Can we define a type using the ranges library that will do the equivalent of span but will work for non-contiguous containers? Maybe I didn't phrase my question right, I probably meant view rather than container.