ReactOS
0.4.16-dev-1946-g52006dd
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)
16
_UCRT_DISABLE_CLANG_WARNINGS
17
_CRT_BEGIN_C_HEADER
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
33
_ACRTIMP
void
__cdecl
_wassert
(
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
48
_CRT_END_C_HEADER
49
_UCRT_RESTORE_CLANG_WARNINGS
50
#pragma warning(pop)
// _UCRT_DISABLED_WARNINGS
__cdecl
#define __cdecl
Definition:
accygwin.h:79
_In_z_
#define _In_z_
Definition:
no_sal2.h:164
_In_
#define _In_
Definition:
no_sal2.h:158
_wassert
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t *_Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line)
corecrt.h
_ACRTIMP
#define _ACRTIMP
Definition:
corecrt.h:138
_UCRT_DISABLE_CLANG_WARNINGS
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition:
corecrt.h:109
_UCRT_RESTORE_CLANG_WARNINGS
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition:
corecrt.h:117
_CRT_END_C_HEADER
#define _CRT_END_C_HEADER
Definition:
vcruntime.h:42
_CRT_BEGIN_C_HEADER
#define _CRT_BEGIN_C_HEADER
Definition:
vcruntime.h:40
sdk
include
ucrt
assert.h
Generated on Thu Dec 4 2025 06:16:39 for ReactOS by
1.9.6