Ticket #8733 (closed Feature Requests: fixed)
Testing for unprotected references to C99 math macros
|Reported by:||Mike Liang <mtliang@…>||Owned by:||johnmaddock|
|Milestone:||To Be Determined||Component:||math|
|Version:||Boost Development Trunk||Severity:||Problem|
Attached is a way to test for unprotected references to C99 math macros on platforms where they are implemented as functions. Adding this to a released header would make it convenient to test new code for any omissions.
I used this to find the problems submitted in ticket #8732.
With, for example, fpclassify redefined, any unprotected references will expand out to a syntax error.
#define fpclassify(x) (another_fpclassify(x)) bad_call = boost::math::fpclassify(arg);
bad_call = boost::math::(another_flclassify(arg));