ReactOS 0.4.15-dev-7711-g5627da4
assert.h
Go to the documentation of this file.
1
6#ifndef __ASSERT_H_
7#define __ASSERT_H_
8
9#include <crtdefs.h>
10
11#ifdef NDEBUG
12
13#ifndef assert
14#define assert(_Expression) ((void)0)
15#endif
16
17#else /* !NDEBUG */
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24 void
27 _In_z_ const char *_Message,
28 _In_z_ const char *_File,
29 _In_ unsigned _Line);
30
32 void
35 _In_z_ const wchar_t *_Message,
36 _In_z_ const wchar_t *_File,
37 _In_ unsigned _Line);
38
39#ifdef __cplusplus
40}
41#endif
42
43#ifndef assert
44#define assert(_Expression) (void)((!!(_Expression)) || (_assert(#_Expression,__FILE__,__LINE__),0))
45#endif
46
47#ifndef wassert
48#define wassert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
49#endif
50
51#endif
52
53#endif
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define _In_z_
Definition: ms_sal.h:313
#define _In_
Definition: ms_sal.h:308
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t *_Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line)
_CRTIMP void __cdecl _assert(_In_z_ const char *_Message, _In_z_ const char *_File, _In_ unsigned _Line)