ReactOS 0.4.16-dev-1059-gb1cf981
assert.h
Go to the documentation of this file.
1//
2// assert.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Defines the assert macro and related functionality.
7//
8#if defined _VCRT_BUILD && !defined _ASSERT_OK
9 #error assert.h not for CRT internal use
10#endif
11
12#include <corecrt.h>
13
14#pragma warning(push)
15#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
18
19#if _CRT_HAS_C11
20
21#define static_assert _Static_assert
22
23#endif // _CRT_HAS_C11
24
25#undef assert
26
27#ifdef NDEBUG
28
29 #define assert(expression) ((void)0)
30
31#else
32
34 _In_z_ wchar_t const* _Message,
35 _In_z_ wchar_t const* _File,
36 _In_ unsigned _Line
37 );
38
39 #define assert(expression) (void)( \
40 (!!(expression)) || \
41 (_wassert(_CRT_WIDE(#expression), _CRT_WIDE(__FILE__), (unsigned)(__LINE__)), 0) \
42 )
43
44#endif
45
46
47
50#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
#define __cdecl
Definition: accygwin.h:79
#define _In_z_
Definition: no_sal2.h:164
#define _In_
Definition: no_sal2.h:158
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t *_Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line)
#define _ACRTIMP
Definition: corecrt.h:138
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40