span value_type chunk size_t at const noexcept if storage_ index size_

1
2
3
4
5
6
7
span<value_type> chunk(size_t at) const noexcept {
if (storage_.index() == 0) {
size_t offset = at * chunk_size;
return { std::get<0>(storage_)[at].data() + offset, std::min(std::get<0>(storage_)[at].size() - offset, chunk_size)};
}
return std::get<1>(storage_)[at];
}