C++ Logo


Advanced search

Subject: Re: [std-proposals] function at() for span<> that throws exception on out-of-range, like vector and array ::at()
From: John McFarlane (john_at_[hidden])
Date: 2019-11-30 10:40:02

On Sat, 30 Nov 2019 at 16:31, Lyberta via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Ville Voutilainen via Std-Proposals:
> > The argument is that an exception that would be thrown by at() is a
> > logic error in the program
> How is sanitizing user input a logic error?

It's not.

Sanitizing user input sounds like something that is best served by explicit
logic. I certainly don't think that UI is any concern of containers.

> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups