17#define stdex_assert(e) { _Analysis_assume_(e); ((void)0); }
18#define stdex_verify(e) ((void)(e))
21#define stdex_assert(e) (!!(e) ? (void)0 : stdex::do_assert(_L(__FILE__), (unsigned)(__LINE__), _L(#e)))
22#elif defined(__APPLE__)
23#define stdex_assert(e) (!!(e) ? (void)0 : stdex::do_assert(__func__, __ASSERT_FILE_NAME, __LINE__, #e))
27#define stdex_verify(e) stdex_assert(e)
33 inline void do_assert(
const wchar_t* file,
unsigned line,
const wchar_t* expression)
43 HWINSTA hWinSta = GetProcessWindowStation();
45 WCHAR sName[MAX_PATH];
46 if (GetUserObjectInformationW(hWinSta, UOI_NAME, sName,
sizeof(sName), NULL)) {
47 sName[_countof(sName) - 1] = 0;
49 if (_wcsicmp(sName, L
"WinSta0") == 0) {
50 _wassert(expression, file, line);
55 RaiseException(STATUS_ASSERTION_FAILURE, EXCEPTION_NONCONTINUABLE, 0, NULL);
57#elif defined(__APPLE__)
58 inline void do_assert(
const char* function,
const char* file,
int line,
const char* expression)
60 __assert_rtn(function, file, line, expression);