Skip to content

Fix build with gcc 4.8.5 (lxplus)

Joseph Mc Kenna requested to merge jmckenna/garfieldpp:master into master

std::vector::cbegin isn't supported in older versions of c++11 compilers (gcc 4.8.5 ie default lxplus7) https://www.cplusplus.com/reference/vector/vector/cbegin

Replace instances of std::vector::cbegin with std::vector::begin in Source/ComponentGrid.cc and Source/ComponentVoxel.cc

Additionally

using std::isnan;
using std::isinf;

caused conflicts with isnan and isinf already declared in math headers. The fix is to replace isnan and isinf with std::isnan and std::isinf in NeBem/Isles.c (the same style as 08d489cc )

garfieldpp now builds (with and without geant4) on Centos7 with the default compiler

Merge request reports