40 #ifndef GEOGRAM_BASIC_ASSERT
41 #define GEOGRAM_BASIC_ASSERT
85 GEO_NORETURN_DECL
void GEOGRAM_API
geo_abort() GEO_NORETURN;
104 const std::
string& condition_string,
105 const std::
string& file,
int line
120 double value,
double min_value,
double max_value,
121 const std::
string& file,
int line
133 const std::
string& file,
int line
149 #define geo_assert(x) { \
151 GEO::geo_assertion_failed(#x, __FILE__, __LINE__); \
165 #define geo_range_assert(x, min_val, max_val) { \
166 if(((x) < (min_val)) || ((x) > (max_val))) { \
167 GEO::geo_range_assertion_failed(x, min_val, max_val, \
177 #define geo_assert_not_reached { \
178 GEO::geo_should_not_have_reached(__FILE__, __LINE__); \
192 #define geo_debug_assert(x) geo_assert(x)
193 #define geo_debug_range_assert(x, min_val, max_val) geo_range_assert(x, min_val, max_val)
194 #define geo_debug(x) x
196 #define geo_debug_assert(x)
197 #define geo_debug_range_assert(x, min_val, max_val)
212 #define geo_parano_assert(x) geo_assert(x)
213 #define geo_parano_range_assert(x, min_val, max_val) geo_range_assert(x, min_val, max_val)
215 #define geo_parano_assert(x)
216 #define geo_parano_range_assert(x, min_val, max_val)
Common include file, providing basic definitions. Should be included before anything else by all head...
Global Vorpaline namespace.
GEO_NORETURN_DECL void geo_assertion_failed(const std::string &condition_string, const std::string &file, int line) GEO_NORETURN
Prints an assertion failure.
void set_assert_mode(AssertMode mode)
Sets assertion mode.
GEO_NORETURN_DECL void geo_should_not_have_reached(const std::string &file, int line) GEO_NORETURN
Prints an unreachable location failure.
GEO_NORETURN_DECL void geo_abort() GEO_NORETURN
Aborts the program.
AssertMode assert_mode()
Returns the current assert termination mode.
AssertMode
Assert termination mode.
GEO_NORETURN_DECL void geo_range_assertion_failed(double value, double min_value, double max_value, const std::string &file, int line) GEO_NORETURN
Prints a range assertion failure.
GEO_NORETURN_DECL void geo_breakpoint() GEO_NORETURN
Generates a debugger breakpoint programmatically.