[Issue 8464] debug too strict from function attributes

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 20 07:27:17 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=8464

--- Comment #5 from hsteoh at quickfur.ath.cx ---
This came up in a recent PR, where assumeUTF has a `debug validate(s)` line to
run a validation check on the input ubyte[]/short[]/int[] in order to catch
user error when passing in invalid data. Since validate() is an expensive
operation, we only do it during -debug. It also makes the function throwing,
etc., which would make it stop compiling if called from pure/nothrow/etc. code.

--


More information about the Digitalmars-d-bugs mailing list