kazuho/picojson — pull request #38 by olafmandel (2014-06-18 13:12:20+00:00)
Title: Add workaround for defective <cmath>

For older compilers (pre-C++11) picojson accesses the `isnan` and `isinf` functions by including ``. But this can lead to problems if the user included `` before including `"picojson.h"`: some implementations of `` include `` themselves and then undefine some macros like `isnan` and `isinf` as not needed before C++11. This happens at least for:
g++ (rev2, Built by MinGW-builds project) 4.8.0

This workaround relies on the fact that if the `` include inside `"picojsoon.h"` fails because of a previous `` include, then `std::isnan` and `std::isinf` are available. And if in contrast `` is properly included, `isnan` and `isinf` are implemented as preprocessor macros.