📄 xassert.h
字号:
// xassert.h// replacement for assert that throws an exception on failure// (x_assert_fail and xfailure_func are in exc.cc)// SafeTP project// copyright SafeTP Development Group, Inc., 2000 Terms of use are as specified in license.txt#ifndef __XASSERT_H#define __XASSERT_Hvoid x_assert_fail(char const *cond, char const *file, int line);#if !defined(NDEBUG) || defined(NDEBUG_ASSERTIONS) #define xassert(cond) \ ((cond)? (void)0 : x_assert_fail(#cond, __FILE__, __LINE__))#else #define xassert(cond) ((void)0)#endif// call when state is known to be bad; will *not* return (ideal// behavior is to throw an exception, systems lacking this can// call abort())#define xfailure(why) x_assert_fail(why, __FILE__, __LINE__)#endif // __XASSERT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -