assert or throw in range members?

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 5 03:25:42 PDT 2016


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?


More information about the Digitalmars-d-learn mailing list