Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_static_assert.h
Go to the documentation of this file.
1
30#ifndef _RWSTD_RW_STATIC_ASSERT_H_INCLUDED
31#define _RWSTD_RW_STATIC_ASSERT_H_INCLUDED
32
33#include <rw/_defs.h>
34
36
40template <bool _Cond>
41struct __rw_static_assert
42{
43};
44
45template <bool _Cond>
46struct __rw_assert_failed;
47
48template <>
49struct __rw_assert_failed<true>
50{
51};
52
53} // namespace __rw
54
55#ifndef _RWSTD_NO_STATIC_ASSERT
56# define _RWSTD_STATIC_ASSERT(Cond,Mesg) static_assert(Cond, Mesg)
57#else
58# define _RWSTD_STATIC_ASSERT(Cond,Mesg) \
59 typedef \
60 _RW::__rw_static_assert<sizeof (_RW::__rw_assert_failed<(Cond)>) != 0> \
61 _RWSTD_PASTE(__static_assert,__LINE__)
62#endif // _RWSTD_NO_STATIC_ASSERT
63
64#endif // _RWSTD_RW_STATIC_ASSERT_H_INCLUDED
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define true
Definition stdbool.h:25