[geos-devel] GCC 6 build error

Mateusz Loskot mateusz at loskot.net
Thu Mar 3 02:40:03 PST 2016

On 3 March 2016 at 11:10, Sandro Santilli <strk at keybit.net> wrote:
> On Thu, Mar 03, 2016 at 10:58:48AM +0100, Mateusz Loskot wrote:
>> However, we should be able to rely on that any C++11 compliant toolset
>> seeing #include <cmath> makes std::nan and std::isfinite available.
> And then what about OS/X and solaris ?

In the dark ages of pre-C++11 compilers, it a lot of 'fun' :-)
Since C++11, nan and isfinite along with other C99 utilities
have been added to C++.

I no longer care about non-C++11 compilers myself,
so for me std::{nan|isfinite} is always there.

> What would you think about removing all the many conditionals and:
>  #define ISNAN(x) ((x)!=(x))


namespage geos { bool is_nan(double x) { return x != x; } }

Best regards,
Mateusz Loskot, http://mateusz.loskot.net

More information about the geos-devel mailing list