Use fully qualified names for isnan, isinf, and finite
Specify the versions in the global namespace, to avoid ambiguity between these and the versions in namespace std that are available in C++11.
This commit is contained in:
parent
94f1b35b79
commit
c885a88817
1 changed files with 3 additions and 3 deletions
|
|
@ -44,10 +44,10 @@ void checkFinite(const double tmp)
|
|||
throw std::range_error("checkFinite()");
|
||||
}
|
||||
#else
|
||||
if (!finite(tmp)) {
|
||||
if (isnan(tmp)) {
|
||||
if (!::finite(tmp)) {
|
||||
if (::isnan(tmp)) {
|
||||
printf("checkFinite() ERROR: we have encountered a nan!\n");
|
||||
} else if (isinf(tmp) == 1) {
|
||||
} else if (::isinf(tmp) == 1) {
|
||||
printf("checkFinite() ERROR: we have encountered a pos inf!\n");
|
||||
} else {
|
||||
printf("checkFinite() ERROR: we have encountered a neg inf!\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue