jeromerobert / hmat-oss

A hierarchical matrix C/C++ library
GNU General Public License v2.0
22 stars 11 forks source link

isnan error in c++14 mode with gcc 6.1 #45

Closed jschueller closed 8 years ago

jschueller commented 8 years ago

Using gcc 6 (fedora 24) I cannot compile hmat unless I replace isnan by std::isnan in compression.cpp & full_matrix.cpp:

[ 21%] Building CXX object CMakeFiles/hmat-oss.dir/src/compression.cpp.o
[  302s] /home/abuild/rpmbuild/BUILD/hmat-oss-1.1.2/src/compression.cpp: In function 'hmat::RkMatrix<typename hmat::Types<T>::dp>* hmat::compress(hmat::CompressionMethod, const hmat::Function<T>&, const hmat::ClusterData*, const hmat::ClusterData*)':
[  302s] /home/abuild/rpmbuild/BUILD/hmat-oss-1.1.2/src/compression.cpp:743:25: error: there are no arguments to 'isnan' that depend on a template parameter, so a declaration of 'isnan' must be available [-fpermissive]
[  302s]      if (isnan(approxNorm)) {
jeromerobert commented 8 years ago

I was not able to reproduce it, so this is a "blind" fix. I hope it's good.

jschueller commented 8 years ago

@jeromerobert it should be fixed in full_matrix.cpp too