title: <cmath> hides isnan in <math.h> in C++14 / C++11?
body: <p>I have here a small test app which uses <code>isnan</code> from <code>&lt;math.h&gt;</code>:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;math.h&gt;
  
  int main()
  {
      double d = NAN;
  
      std::cout &lt;&lt; isnan(d) &lt;&lt; '\n';
  
      return 0;
  }
  </code></pre>
  <p><strong>Build and run under 3 different standards:</strong></p>
  <blockquote>
  <pre><code>$ g++ -std=c++98 main.cpp; ./a.out
  1
  
  $ g++ -std=c++11 main.cpp; ./a.out
  1
  
  $ g++ -std=c++14 main.cpp; ./a.out
  1
  </code></pre>
  </blockquote>
  <p>Now we also include <code>&lt;cmath&gt;</code>, and test with both <code>isnan</code> and <code>std::isnan</code>:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  #include &lt;math.h&gt;
  
  int main()
  {
      double d = NAN;
  
      std::cout &lt;&lt; std::isnan(d) &lt;&lt; '\n';
      std::cout &lt;&lt; isnan(d) &lt;&lt; '\n';
  
      return 0;
  }
  </code></pre>
  <p><strong>Build and run:</strong></p>
  <p><em><strong>C++98 works</strong></em></p>
  <blockquote>
  <pre><code>$ g++ -std=c++98 main.cpp; ./a.out
  1
  1
  </code></pre>
  </blockquote>
  <p><em><strong>C++11 and C++14 don't, <code>isnan</code> is not found.</strong></em></p>
  <blockquote>
  <pre><code>$ g++ -std=c++11 main.cpp
  main.cpp: In function ‘int main()’:
  main.cpp:10:25: error: ‘isnan’ was not declared in this scope
       std::cout &lt;&lt; isnan(d) &lt;&lt; '\n';
                           ^
  main.cpp:10:25: note: suggested alternative:
  In file included from main.cpp:3:0:
  /usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
       isnan(_Tp __x)
       ^
  
  $ g++ -std=c++14 main.cpp
  main.cpp: In function ‘int main()’:
  main.cpp:10:25: error: ‘isnan’ was not declared in this scope
       std::cout &lt;&lt; isnan(d) &lt;&lt; '\n';
                           ^
  main.cpp:10:25: note: suggested alternative:
  In file included from main.cpp:3:0:
  /usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
       isnan(_Tp __x)
       ^
  </code></pre>
  </blockquote>
  <p>Note the order of inclusion is not important. If I include <code>&lt;cmath&gt;</code> before <code>&lt;math.h&gt;</code> or after, the result is the same.</p>
  <p><strong>Questions</strong></p>
  <ul>
  <li>Why is <code>isnan</code> gone?</li>
  <li>Without having to go back and change old code to compile under the new standard, is there any way to fix this?</li>
  </ul>