error: ‘numeric_limits’ is not a member of ‘std’
Closed this issue · 1 comments
rjfarmer commented
Hi,
When building with gcc 11.2.1 i get this error:
/home/rob/data/src/FastChem/fastchem_src/init_solver.cpp:90:30: error: ‘numeric_limits’ is not a member of ‘std’
90 | j->abundance += std::numeric_limits<double_type>::epsilon()*j->abundance;
| ^~~~~~~~~~~~~~
/home/rob/data/src/FastChem/fastchem_src/init_solver.cpp:90:56: error: expected primary-expression before ‘>’ token
90 | j->abundance += std::numeric_limits<double_type>::epsilon()*j->abundance;
| ^
/home/rob/data/src/FastChem/fastchem_src/init_solver.cpp:90:59: error: ‘::epsilon’ has not been declared
90 | j->abundance += std::numeric_limits<double_type>::epsilon()*j->abundance;
|
It looks like you need to add some new headers for gcc 11.
https://www.gnu.org/software/gcc/gcc-11/porting_to.html#header-dep-changes
Just adding
#include <limits>
To to the top of init_solver.cpp fixes things for me
daniel-kitzmann commented
Thanks @rjfarmer for reporting the issue. The problem has been fixed now in the new 2.1 release.