C++ Logo


Advanced search

Re: function at() for span<> that throws exception on out-of-range, like vector and array ::at()

From: Nevin Liber <nevin_at_[hidden]>
Date: Sun, 1 Dec 2019 23:59:27 -0600
On Sat, Nov 30, 2019 at 2:09 PM Lyberta via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> I wanted to point out that making std::span API compatible with
> std::vector and std::array is still not ideal.

We won't get there anyway. For instance, comparison operators such as
operator== were deliberately removed (by P1085R2 in San Diego) because the
committee believes because span is non-owning and therefore not regular, it
shouldn't have comparison operators, even though there was no evidence
presented that this is a problem for, say, string_view users.
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden] <nevin_at_[hidden]>>

Received on 2019-12-02 00:02:28