|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Utility macros for EBGeometry. More...
#include <cstdio>#include <cstdlib>

Go to the source code of this file.
Macros | |
| #define | EBGEOMETRY_EXPECT(cond) ((void)(cond)) |
| Runtime precondition assertion for EBGeometry. | |
Utility macros for EBGeometry.
| #define EBGEOMETRY_EXPECT | ( | cond | ) | ((void)(cond)) |
Runtime precondition assertion for EBGeometry.
When EBGEOMETRY_ENABLE_ASSERTIONS is defined (e.g. via -DEBGEOMETRY_ENABLE_ASSERTIONS on the compiler command line, in CXXFLAGS for GNU Make, or via CMake's target_compile_definitions), this macro evaluates cond and, if it is false, prints a diagnostic message to stderr and calls std::abort().
When EBGEOMETRY_ENABLE_ASSERTIONS is not defined the macro still evaluates the condition (to suppress "unused variable" warnings from variables that appear only inside assertions) but the result is discarded at zero runtime cost.
| cond | Boolean-convertible expression to test. |