我怎样才能cerr
打印5 < 6
而不是statement_
?我可以访问 Boost 和 Qt。
using namespace std;
#define some_func( statement_ ) \
if( ! statement_ ) \
{ \
throw runtime_error( "statement_" ); \
} \
int main()
{
try
{
some_func( 5 < 6 );
}
catch(std::exception& e)
{
cerr << e.what();
}
}