December 16, 2005 static assert(0) should halt compilation. | ||||
---|---|---|---|---|
| ||||
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. |
Copyright © 1999-2021 by the D Language Foundation