XIEITE_DEBUG
Defined in header <xieite/debug.hpp>
(header-only:
<xieite/pp/debug.hpp>
)
Detects the presence of platform-specific macros indicating debug mode:
DEBUG
, NDEBUG
, _DEBUG
, and QT_DEBUG
.Definition
#define XIEITE_DEBUG /* 0 or 1 */
Example
Possible output:#include <xieite/debug.hpp> import xieite ;int add (int a ,int b ) {if constexpr (XIEITE_DEBUG ) {std ::"Adding ,{} and{}\n "a ,b ); }return a +b ; }int main () {int sum =add (1 ,2 );std ::"Result: ,{}\n "sum ); }
View in Compiler ExplorerAdding 1 and 2 Result: 3