摘要:
Diagnostics定义宏:void assert (scalar-expression);若expression为0,则打印出错信息(类似Assertion failed: expression, function abc, file xyz, line nnn.),调用abort函数中断程序执行。若定义了NDEBUG,则assert宏无效: #define assert(ignore) ((void)0)static_assert ( constant-expression , string-literal ) ;编译期断言。可扩展成_Static_assert// gcc -std=c 阅读全文