Development-only contract assertion macro for optimized builds. More...
Go to the source code of this file.
Macros | |
| #define | VRV_CONTRACT_ASSERT(expr) |
| Compiles to nothing when contract asserts are disabled (default). | |
Development-only contract assertion macro for optimized builds.
VRV_CONTRACT_ASSERT(expr) is a lightweight precondition/postcondition check intended for use during development. It validates assumptions at API boundaries, state transitions, and other non-trivial call sites.
This macro is NOT intended for inner loops or performance-critical code. It exists to catch contract violations early during development without requiring a full debug build.
Behavior:
To enable:
The assert fires regardless of NDEBUG, so it works in RelWithDebInfo builds.
| #define VRV_CONTRACT_ASSERT | ( | expr | ) |
Compiles to nothing when contract asserts are disabled (default).