pulsatrix
Loading...
Searching...
No Matches
assert.hpp
Go to the documentation of this file.
1
7#pragma once
8
9#include <cstdio>
10#include <cstdlib>
11
12#ifdef NDEBUG
14#define PULSATRIX_ASSERT(cond) ((void)0)
15#else
22#define PULSATRIX_ASSERT(cond) \
23 do { \
24 if (!(cond)) { \
25 std::fprintf(stderr, "PULSATRIX_ASSERT failed: %s at %s:%d\n", #cond, __FILE__, __LINE__); \
26 std::abort(); \
27 } \
28 } while (0)
29#endif