What is the idiomatic way to create a fixed size std::array from a fixed size std::span?

I am trying to create a std::array<uint8_t,N> from a std::span<uint8_t,N> but I cannot find a way to do so without memcpy, std::copy, or std::ranges::copy which don’t protect me against wrong specification of destination array size. #include <algorithm> #include <array> #include <iostream> #include <span> int main(int argc, char **argv) { constexpr size_t N = 10; std::array<uint8_t,… Read More What is the idiomatic way to create a fixed size std::array from a fixed size std::span?