https://travis-ci.org/letmaik/lensfunpy/jobs/394229394#L548-L550
[ 78%] Building CXX object libs/lensfun/CMakeFiles/lensfun.dir/mod-pc.cpp.o
/lensfunpy/external/lensfun/libs/lensfun/mod-pc.cpp:75:12: error: ‘isnan’ is already declared in this scope
using std::isnan;
The lensfun commit I'm building with is c44b811f (latest master as of this post).
I cannot reproduce this, any idea how this can happen? I could not find any other place where std::isnan is declared or loaded into the global scope... It works for me on GCC 6.3.
Looks like an issue on older GCC that has been fixed since (roughly >= 6.1 which is April 2016):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891
https://bugs.webkit.org/show_bug.cgi?id=59249
Webkit's workaround is https://trac.webkit.org/changeset/117779/webkit but I would agree we don't want this kind of heavy machinery. Let me see if there's another solution, apart from forcing gcc >= 6.1.
An easy solution would be to use the qualified
std::isnan
and removingusing std::isnan;
.Ok, thanks for your help. I will use your proposed change.