C++ Logo

std-proposals

Advanced search

Re: std::span

From: Vishal Oza <vickoza_at_[hidden]>
Date: Tue, 14 Apr 2020 21:00:11 -0500
I believe the issue is the at() function has exception handling for out of
bound errors. std::span checks bounds at compile time so the error handling
is redundant. There is an inefficiency to have out of bounds exception
handling even if you never use it. Zero work is always faster then work
that is never used.

On Tue, Apr 14, 2020 at 8:52 PM Mario Charest via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> Hello,
>
> What is the rational for std::span not having an at() fonction, like most
> other contiguous container.
>
> Regards,
>
> - Mario
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2020-04-14 21:04:45