Limbo 3.5.4
Loading...
Searching...
No Matches
AssertMsg.h
Go to the documentation of this file.
1
13
14#ifndef LIMBO_PREPROCESSOR_ASSERTMSG_H
15#define LIMBO_PREPROCESSOR_ASSERTMSG_H
16
17#include <iostream>
19
24#define limboAssertMsg(condition, args...) do {\
25 if (!(condition)) \
26 {\
27 ::limbo::limboPrintAssertMsg(#condition, __FILE__, __LINE__, __PRETTY_FUNCTION__, args); \
28 abort(); \
29 }\
30} while (false)
31
36#define limboAssert(condition) do {\
37 if (!(condition)) \
38 {\
39 ::limbo::limboPrintAssertMsg(#condition, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
40 abort(); \
41 }\
42} while (false)
43
45namespace limbo
46{
47
49template <bool>
52template <>
53struct StaticAssert<true> {};
54
55} // namespace limbo
56
59#define limboStaticAssert(condition) {\
60 limbo::StaticAssert<(condition) != 0>(); \
61}
62
63#endif
header to include PrintMsg.h and AssertMsg.h
namespace for Limbo
static assertion
Definition AssertMsg.h:50