ReactOS  0.4.14-dev-342-gdc047f9
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
20 extern "C" {
21 #endif
22 
23  _CRTIMP
24  void
25  __cdecl
26  _assert(
27  _In_z_ const char *_Message,
28  _In_z_ const char *_File,
29  _In_ unsigned _Line);
30 
31  _CRTIMP
32  void
33  __cdecl
34  _wassert(
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
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t *_Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line)
#define _CRTIMP
Definition: crtdefs.h:60
_CRTIMP void __cdecl _assert(_In_z_ const char *_Message, _In_z_ const char *_File, _In_ unsigned _Line)
#define _In_
Definition: no_sal2.h:204
#define _In_z_
Definition: no_sal2.h:239