|
FlatImage
A configurable Linux containerization system
|
Simplified macros for common control flow patterns with optional logging. More...
#include "lib/log.hpp"Go to the source code of this file.
Macros | |
| #define | return_if(condition, value, ...) |
| #define | break_if(condition, ...) |
| #define | continue_if(condition, ...) |
| #define | log_if(condition, ...) |
Simplified macros for common control flow patterns with optional logging.
This file provides a minimal set of preprocessor macros designed to reduce boilerplate code by combining conditional statements with actions like return, break, and continue. All macros support optional logging by including a format string and arguments after the action.
The logging level is determined by the prefix in the format string itself (D::, I::, W::, E::, C::) which is processed by the logger at compile time.
Definition in file macro.hpp.
| #define break_if | ( | condition, | |
| ... ) |
| #define continue_if | ( | condition, | |
| ... ) |
| #define log_if | ( | condition, | |
| ... ) |