1 #ifndef SYMENGINE_ASSERT_H
2 #define SYMENGINE_ASSERT_H
6 #if defined(WITH_SYMENGINE_ASSERT)
8 #if !defined(SYMENGINE_ASSERT)
9 #define stringize(s) #s
10 #define XSTR(s) stringize(s)
11 #define SYMENGINE_ASSERT(cond) \
14 std::cerr << "SYMENGINE_ASSERT failed: " << __FILE__ \
15 << "\nfunction " << __func__ << "(), line number " \
16 << __LINE__ << " at \n" \
17 << XSTR(cond) << "\n"; \
23 #if !defined(SYMENGINE_ASSERT_MSG)
24 #define SYMENGINE_ASSERT_MSG(cond, msg) \
27 std::cerr << "SYMENGINE_ASSERT failed: " << __FILE__ \
28 << "\nfunction " << __func__ << "(), line number " \
29 << __LINE__ << " at \n" \
30 << XSTR(cond) << "\n" \
31 << "ERROR MESSAGE:\n" \
40 #define SYMENGINE_ASSERT(cond)
41 #define SYMENGINE_ASSERT_MSG(cond, msg)
45 #define SYMENGINE_ERROR(description) \
46 std::cerr << description; \