ShlubluLib
v0.5
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
|
Go to the source code of this file.
Macros | |
#define | SHLUBLU_TODO(msg) _Pragma (__stringize(message "TODO: " msg)) |
#define | SHLUBLU_DEBUG(msg) _Pragma (__stringize(message "DEBUG: " msg)) |
#define | SHLUBLU_OPTIMIZE_OFF() _Pragma (__stringize(GCC warning "SHLUBLU_OPTIMIZE_OFF() has no effect with this platform.")) |
Macros useful for developing and debugging: compilation messages, optimization control, and so on.
#define SHLUBLU_TODO | ( | msg | ) | _Pragma (__stringize(message "TODO: " msg)) |
Displays a compile-time "TODO" message.
Example
Output at compile time:
#define SHLUBLU_DEBUG | ( | msg | ) | _Pragma (__stringize(message "DEBUG: " msg)) |
Displays a compile-time "DEBUG" message.
Example
Output at compile time:
#define SHLUBLU_OPTIMIZE_OFF | ( | ) | _Pragma (__stringize(GCC warning "SHLUBLU_OPTIMIZE_OFF() has no effect with this platform.")) |
Prevent any compiler optimization from being performed in the current file after this statement.
This allows doing step-by-step debugging in release mode. This macro is only useful with Windows as its debug mode is very slow due to the numerous STL checks it performs at run-time. It is not implemented for Linux which has a workable debug mode: a warning is displayed instead.
Example
Output at compile time:
Windows:
Linux: