Possible Duplicate:
Why are there sometimes meaningless do/while and if/else statements in C/C++ macros?
#define QL_REQUIRE(condition,message) \
if (!(condition)) { \
    std::ostringstream _ql_msg_stream; \
    _ql_msg_stream << message; \
    throw QuantLib::Error(__FILE__,__LINE__, \
                          BOOST_CURRENT_FUNCTION,_ql_msg_stream.str()); \
 } else 
How to use it:
void testingMacros1 (){
   double x =0.0;
   QL_REQUIRE (x!=0 ," Zero number !");
}
why the macro injects a else in the end?
 
    