Loading...
Searching...
No Matches
Go to the documentation of this file.
19 #if defined FAST_RELEASE & defined NDEBUG
21 #define assert_release(ignore_test) ((void)0)
25 #if defined __PRETTY_FUNCTION__
27 #define assert_release(test) \
30 std::string s = std::string("\n=============================================================================") \
31 + "\nThe following Codac assertion failed:\n\n\t" + std::string(#test) \
32 + "\n \nIn: " + std::string(__FILE__) + ":" + std::to_string(__LINE__) \
33 + "\nFunction: " + std::string(__PRETTY_FUNCTION__) \
34 + "\nYou need help? Submit an issue on: https://github.com/codac-team/codac/issues" \
35 + "\n============================================================================="; \
36 throw std::invalid_argument(s); \
43 #define assert_release(test) \
46 std::string s = std::string("\n=============================================================================") \
47 + "\nThe following Codac assertion failed:\n\n\t" + std::string(#test) \
48 + "\n \nIn: " + std::string(__FILE__) + ":" + std::to_string(__LINE__) \
49 + "\nFunction: " + std::string(__func__) \
50 + "\nYou need help? Submit an issue on: https://github.com/codac-team/codac/issues" \
51 + "\n============================================================================="; \
52 throw std::invalid_argument(s); \
64 #define assert_release(test) \
67 auto l = std::source_location::current(); \
68 std::ostringstream s; \
69 s << l.file_name() << '(' \
71 << l.column() << ")\n " \
72 << l.function_name() << "\n"; \
73 throw std::invalid_argument("Wrong assertion in the following function:\n " + s.str()); \