Namespace for isfinite in src/external/lmfit/lmmin.cpp is not specified - Redmine #2400
Archive from user: Veselin Kolev
A violation of C++11 syntax is detected in src/external/lmfit/lmmin.cp When compiling GROMACS with Intel Compiler the icpc compiler rises the following error:
/home/builder/gromacs-2018/src/external/lmfit/lmmin.cpp(395): error:
more than one instance of overloaded function “isfinite” matches the
argument list:
function “isfinite(double)”
function “std::isfinite(double)”
argument types are: (double)
if (!isfinite(temp1)) {
^
The compiler detects multiple (two in this case) instances of isfinite. On the GNU Linux systems isfinite is supplied by both math.h and it is also part to std naming space. Providing proper name space to isfinite is recommended. See the patch attached.
(from redmine: issue id 2400, created on 2018-02-06 by gmxdefault, closed on 2018-02-08)
- Changesets:
- Revision d3d2ea00 by Mark Abraham on 2018-02-06T09:57:10Z:
Use isfinite unambiguously
Patch provdied by Veselin Kolev
Fixes #2400
Change-Id: I1923998a2288e20cb339e7fc59210cbf9ac5bfa8