Open
Description
In the code we make extensive use of C macros to enable/disable certain regions of code based on compiler flags. These C macros could be replaced by C++ constexpr
equivalents and
#define ENABLE_FEATURE 1
#if ENABLE_FEATURE
...
#endif
by
constexpr bool enable_feature = true;
if constexpr (enable_feature) {
...
}
This way all code would always be checked by the compiler independent of the local compiler flags, which reduces possible errors that one doesn't catch locally.
Maybe there is a way for CMake to create constexpr
variables directly instead of defining C macro variables.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To do (open issues)