Last change
on this file since 9398177 was
f9f3775,
checked in by Thierry Delisle <tdelisle@…>, 4 years ago
|
Moved phd code for the readQ prototype to it's own folder
|
-
Property mode set to
100644
|
File size:
546 bytes
|
Rev | Line | |
---|
[b2a37b0] | 1 | #pragma once |
---|
| 2 | |
---|
[50aeb6f] | 3 | #ifndef NDEBUG |
---|
[b2a37b0] | 4 | #include <cassert> |
---|
| 5 | #include <cstdlib> |
---|
| 6 | |
---|
| 7 | #define sstr(s) #s |
---|
| 8 | #define xstr(s) sstr(s) |
---|
| 9 | |
---|
| 10 | extern const char * __my_progname; |
---|
| 11 | |
---|
| 12 | #define assertf(cond, ...) ({ \ |
---|
| 13 | if(!(cond)) { \ |
---|
| 14 | fprintf(stderr, "%s: " __FILE__ ":" xstr(__LINE__) ": %s: Assertion '" xstr(cond) "' failed.\n", __my_progname, __PRETTY_FUNCTION__); \ |
---|
| 15 | fprintf(stderr, __VA_ARGS__); \ |
---|
| 16 | fprintf(stderr, "\n"); \ |
---|
| 17 | std::abort(); \ |
---|
| 18 | } \ |
---|
[50aeb6f] | 19 | }) |
---|
| 20 | #else |
---|
| 21 | #define assertf(cond, ...) |
---|
| 22 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.