Add a warn_if macro

This commit is contained in:
Danny Robson 2011-11-04 16:50:41 +11:00
parent ea50f64857
commit 6b38a3486c

View File

@ -33,6 +33,13 @@
}
#define warn_if(C, MSG) do { \
if (C) { \
std::cerr << __FILE__ << ":" << __func__ << ":" __LINE__ << ", " << (MSG) << std::endl; \
} \
} while (0)
#define verify_soft(C, COND) ({ \
const auto __DEBUG_value = (C); \
check_soft(__DEBUG_value COND); \