⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcl_cassert.h

📁 DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.
💻 H
字号:
// This is vcl/vcl_cassert.h

//- The <cassert> header does not
//- have inclusion guards. The
//- C and C++ standards say so.

//:
// \file
// \author fsm

#include "vcl_compiler.h"

// This header file should do something like this:
//   #undef assert
//   #ifdef NDEBUG
//   # define assert(x) ((void) 0)
//   #else
//   extern void vcl_cassert_failure(char const *, int, char const *);
//   # define assert(x) do { if (!(x)) vcl_cassert_failure(__FILE__, __LINE__, #x); } while (false)
//   #endif
// If the system/compiler version works, use that instead.

// Win32 doesn't work as you can't set a bp on abort
#ifdef _WIN32
#undef assert
#ifdef NDEBUG
# define assert(x) ((void) 0)
#else
extern void vcl_cassert_failure(char const *, int, char const *);
# define assert(x) do { if (!(x)) vcl_cassert_failure(__FILE__, __LINE__, #x); } while (false)
#endif

#ifdef VCL_METRO_WERKS
// for some reason, MW's <cassert> doesn't have its own printf() and abort() declarations.
# include <vcl_cstdio.h>
# include <vcl_cstdlib.h>
#endif

#else
#if !VCL_CXX_HAS_HEADER_CASSERT
# include <assert.h>
#else
# include "iso/vcl_cassert.h"
#endif
#endif

// fsm: There should not be a vcl_assert macro as there is no
// std::assert symbol. If your assert macro is broken, fix it
// here using #undef and #define.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -