Debian Codegraph @

cmake/cxx_tests/isnan_in_namespace_std.cpp

raw
1 // DESCRIPTION
2 //
3 // Test to check whether the isnan function is provided by the cmath header file in std::
4 // namespace, define HAVE_ISNAN_IN_NAMESPACE_STD.
5 //
6 // COPYLEFT
7 //
8 // Copyright (c) 2011 Theo Papadopoulo <[email protected]>
9 //
10 // Copying and distribution of this file, with or without modification, are
11 // permitted in any medium without royalty provided the copyright notice
12 // and this notice are preserved.
13
14 #include <cmath>
15
16 namespace S {
17 bool isnan(const float x) { return std::isnan(x); }
18 }
19
20 int main() {
21 using namespace S;
22 float x = 1.0;
23 S::isnan(x);
24 return 0;
25 }