Use isfinite and isnan provided by <cmath>#231
Use isfinite and isnan provided by <cmath>#231a-andre wants to merge 2 commits intocoin-or:masterfrom
Conversation
The included <cmath> provides std::isfinite and std::isnan. There is no need to fallback to C functions.
With C++11 it became part of the standard, but before that?
But is there a harm in doing so? |
|
It seems I misinterpreted the Anyway, C++11 seems well supported nowadays. So why not required it for the current development version of CoinUtils and simplify code where possible? |
|
I recall some discussions where a C++11 dependency was introduced the first time, and the decision back then was to not make it a requirement. In my recollection, the argument was that it would only be worth to go for C++11 if the whole code base would be cleaned up to use C++11 features. Increasing the C++ requirement just to save a few lines in CoinFinite.cpp wouldn't seem worth it. |
|
Based on 1a83f9b I assume the discussion happened 5 years ago. Things might have changed since then. If there is a probability of being accepted, I can looking into making more use of C++11 (or newer?) features. |
Not in this corner of COIN-OR.
I don't think there is anything good at requiring higher C++ versions just because one could. If it were to provide some new interesting functionality or a (measurable) gain in performance, then that would be an argument. Also, if you wanted to take over the development of this project, then I would understand if you want a cleaner code base to work with. |
The included provides std::isfinite and std::isnan. There is no need to fallback to C functions.