Generic macros
[QuantLib macros]
Detailed Description
Miscellaneous macros for compiler idiosyncrasies not fitting other categories.
Defines | |
#define | QL_DUMMY_RETURN(x) |
Is a dummy return statement required? | |
#define | QL_IO_INIT |
I/O initialization. |
Define Documentation
|
Is a dummy return statement required? Some compilers will issue a warning if it is missing even though it could never be reached during execution, e.g., after a block like if (condition) return validResult; else QL_FAIL("whatever the reason"); |
|
I/O initialization. Sometimes, programs compiled with the free Borland compiler will crash miserably upon attempting to write on std::cout. Strangely enough, issuing the instruction std::cout << std::string(); std::cout from crashing the program. This macro, to be called at the beginning of main() , encapsulates the above enchantment for Borland and is defined as empty for the other compilers.
|