mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
a26b981f45
This commit broadens the scope of commit 2ad332e0b (PR #922) to apply to all compilers/libraries, not just Clang/libc++, which do not have support for floating-point types in std::from_chars(). While hopefully a transient situation, this enables building the parameter system with GCC versions prior to GCC 11. We expect to require version 11 in the not too distant future, though. At that point we should revert this commit. We use a configure-time feature test of the compiler (CMake command 'try_compile') to detect whether or not the compiler supports floating-point overloads of std::from_chars() and emit the result to config.h as the new preprocessor symbol HAVE_FLOATING_POINT_FROM_CHARS We use std::strtod() as the fall-back alternative for floating point conversion if this symbol is defined to false (zero). |
||
---|---|---|
.. | ||
testFloatFromChars.cpp |