Take the 2-minute tour ×  Now "static_assert" is a keyword in
C++0x I thought it would be logical to replace the C "assert"
macro with an "assert" keyword too.  share|improve this question
7 Answers 7  static_assert is interpreted at compile time so it
has to be a keyword so the compiler can process it.  assert
doesn't need to be a keyword, and it doesn't make much sense to
make it one, since there are many ways a program might want to
respond to assertion success or failure. Therefore, it makes
more sense to implement it in a library, and it is typically
implemented as a macro.  share|improve this answer There being
multiple ways to respond to a failed assertion is not much of an
argument, since even without being a keyword the language
specifies behavior –  Dennis Zickefoose Jun 2 '11 at 19:21
@Dennis: It specifies behaviour if you use the assert defined in
<cassert>; that doesn't stop you from providing your own
definition. –  Oliver Charlesworth Jun 3 '11 at 8:30 @Oli: if
you include any standard library