digitalmars.D.bugs - static assert(0) should halt compilation.
- Don Clugston (7/7) Dec 16 2005 assert(0) halts runtime execution.
assert(0) halts runtime execution. static assert(0) should do the same for compile-time. Once you've tripped a static assert, there's really no point in continuing. Because it doesn't halt, the helpful "static assert failed" message is frequently followed by hundreds of lines of confusing, irrelevant error messages. This makes it really hard to make a user-friendly template library.
Dec 16 2005