Disallow side effects in assert
bearophile
bearophileHUGS at lycos.com
Mon Feb 3 11:38:20 PST 2014
Marco Leise:
> Damn those gotchas. Basically lock.try_acquire is pure when it
> returns false, and if not, the program is terminated anyways so
> it doesn't make a difference.
So an annotation like the proposed @noreturn (similar to GCC
function annotation, and useful for functions that do not return,
so they can be used where you use assert(0) and the like) is not
enough to solve this problem.
Bye,
bearophile
More information about the Digitalmars-d
mailing list