Medusa  1.1
Coordinate Free Mehless Method implementation
assert.cpp
Go to the documentation of this file.
2 
8 namespace mm {
9 
10 namespace assert_internal {
11 
12 bool assert_handler_implementation(const char* condition, const char* file, const char* func_name,
13  int line, const char* message, tfm::FormatListRef format_list) {
14  std::cerr << "\x1b[37;1m"; // white bold
15  tfm::format(std::cerr, "%s:%d: %s: Assertion `%s' failed with message:\n",
16  file, line, func_name, condition);
17  std::cerr << "\x1b[31;1m"; // red bold
18  tfm::vformat(std::cerr, message, format_list);
19  std::cerr << "\x1b[37;0m\n"; // no color
20  std::cerr.flush();
21  return true;
22 }
23 
24 } // namespace assert_internal
25 
26 } // namespace mm
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
mm::assert_internal::assert_handler_implementation
bool assert_handler_implementation(const char *condition, const char *file, const char *func_name, int line, const char *message, tfm::FormatListRef format_list)
Actual assert implementation.
Definition: assert.cpp:12
assert.hpp