We hard-abort on assertion violations.
| 5 | { |
| 6 | // We hard-abort on assertion violations. |
| 7 | [[noreturn]] void assertion_failed_msg_helper( |
| 8 | char const *expr, char const *msg, char const *function, char const *file, long line) |
| 9 | { |
| 10 | const auto tid = std::this_thread::get_id(); |
| 11 | |
| 12 | std::cerr << "[assert][" << tid << "] " << file << ":" << line << "\nin: " << function << ": " |
| 13 | << expr << "\n" |
| 14 | << msg; |
| 15 | |
| 16 | std::terminate(); |
| 17 | } |
| 18 | } // namespace |
| 19 | |
| 20 | // Boost.Assert only declares the following two functions and let's us define them here. |
no outgoing calls
no test coverage detected