C++ Logo

std-proposals

Advanced search

[std-proposals] Make std::span convertible to a const'd span

From: Oliver Schädlich <oliver.schaedlich_at_[hidden]>
Date: Sun, 22 Sep 2024 18:19:58 +0200

It would be nice to make it possible that a span<Xxx> could be converted implicitly to a
span<const Xxx> as well as the iterators inside such spans could be converted to their
const'd parent span's counterpart. Maybe the opposite direction as explicit would make
also sense.

I'm using spans and span-iterators a lot to have bounds-checking on linear memory
ranges while debugging.


Received on 2024-09-22 16:19:55