#define CHECK2(condition, message) \
(!(condition)) ? (std::cerr << "Assertion failed: (" << #condition << "), " \
<< "function " << __FUNCTION__ << ", file " << __FILE__ << ", line " << __LINE__ << "." << std::endl \
<< message << std::endl, \
abort(), 0) \
: 1
// CHECK2(condition, "message: " << var);
标签:std,简洁,C++,cerr,CHECK,condition
From: https://www.cnblogs.com/vaughnhuang/p/16821451.html