#include <cassert>
#include <cstdio>
|
| #define | UTILS_PREDICT_TRUE(x) |
| | A hint to the compiler that the expression x is likely to evaluate to true.
|
| #define | UTILS_PREDICT_FALSE(x) |
| | A hint to the compiler that the expression x is likely to evaluate to false.
|
|
#define | UTILS_UNREACHABLE() |
| | A hint to the compiler that the code following this macro is unreachable.
|
| #define | UTILS_RELEASE_ASSERT(x) |
| | An assert that evaluates on both release and debug builds.
|
| #define | UTILS_RELEASE_ASSERT_MSG(x, msg) |
| | An assert that evaluates on both release and debug builds and errors with the provided msg.
|
| #define | UTILS_EXCEPTIONS_ENABLED() |
| | Returns true if exceptions are enabled, false otherwise.
|
◆ UTILS_EXCEPTIONS_ENABLED
| #define UTILS_EXCEPTIONS_ENABLED |
( |
| ) |
|
Value:
Returns true if exceptions are enabled, false otherwise.
◆ UTILS_PREDICT_FALSE
| #define UTILS_PREDICT_FALSE |
( |
| x | ) |
|
Value:
A hint to the compiler that the expression x is likely to evaluate to false.
- Parameters
-
| x | The expression to evaluate. |
◆ UTILS_PREDICT_TRUE
| #define UTILS_PREDICT_TRUE |
( |
| x | ) |
|
Value:
A hint to the compiler that the expression x is likely to evaluate to true.
- Parameters
-
| x | The expression to evaluate. |
◆ UTILS_RELEASE_ASSERT
| #define UTILS_RELEASE_ASSERT |
( |
| x | ) |
|
Value:
An assert that evaluates on both release and debug builds.
Asserts that x is true in release builds, stopping execution with an abort. On debug builds, falls back to an assert.
- Parameters
-
| x | The expression to evaluate. |
◆ UTILS_RELEASE_ASSERT_MSG
| #define UTILS_RELEASE_ASSERT_MSG |
( |
| x, |
|
|
| msg ) |
Value:
An assert that evaluates on both release and debug builds and errors with the provided msg.
Asserts that x is true in release builds, stopping execution with an abort. On debug builds, falls back to an assert.
- Parameters
-
| x | The expression to evaluate. |
| msg | A message to print if the assertion fails. |
- Examples
- svg_tree_interaction.cc.