In file included from /home/crtrott/MiniApps/miniQMC/src/spline2/MultiBsplineData.cpp:18:0:
/home/crtrott/MiniApps/miniQMC/src/spline2/MultiBsplineData.hpp: In static member function ‘static void qmcplusplus::SplineBound<T>::get(T, T&, int&, int)’:
/home/crtrott/MiniApps/miniQMC/src/spline2/MultiBsplineData.hpp:29:12: error: ‘modf’ is not a member of ‘std’
dx=std::modf(x,&ipart);
^
/home/crtrott/MiniApps/miniQMC/src/spline2/MultiBsplineData.hpp:30:15: error: ‘min’ is not a member of ‘std’
ind = std::min(std::max(int(0),static_cast<int>(ipart)),ng);
^
/home/crtrott/MiniApps/miniQMC/src/spline2/MultiBsplineData.hpp:30:24: error: ‘max’ is not a member of ‘std’
ind = std::min(std::max(int(0),static_cast<int>(ipart)),ng);
^
make[2]: *** [src/CMakeFiles/qmcutil.dir/spline2/MultiBsplineData.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
This is with GCC 5.3.0. Adding the following before any of the other includes in MultiBsplineData.cpp fixes this:
#include<cmath>
#include<algorithm>
Adding these includes after the other ones does not fix it. This probably means that "math.h" gets included somewhere. I couldn't find it explicitly, but there might be an indirect inclusion. Including "math.h" sometimes prevents inclusion of later on, and only is guaranteed to have modf in the std namespace.
Getting this error after doing in /build :
This is with GCC 5.3.0. Adding the following before any of the other includes in MultiBsplineData.cpp fixes this:
Adding these includes after the other ones does not fix it. This probably means that "math.h" gets included somewhere. I couldn't find it explicitly, but there might be an indirect inclusion. Including "math.h" sometimes prevents inclusion of later on, and only is guaranteed to have modf in the std namespace.