assert or throw in range members?
H.Loom via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 5 08:50:50 PDT 2016
On Friday, 5 August 2016 at 10:25:42 UTC, Nordlöw wrote:
> Should range members front() and back() assert() or throw() on
> emptyness?
>
> If it should assert() doesn't that lead to unsafer code in
> release mode?
>
> What's the consensus here?
nothing, but examples exist in pbobos such as front() on narrow
strings.
More information about the Digitalmars-d-learn
mailing list