Review Request 111509: Use math.h instead of cmath.

Raphael Kubo da Costa rakuco at FreeBSD.org
Sun Jul 14 22:13:53 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111509/
-----------------------------------------------------------

Review request for KDE Utils, Kurt Hindenburg, Evan Teran, and Vadim Zhukov.


Description
-------

Also known as "let's try to prevent the #ifdef madness before it grows too
wild".

`isinf' and `isnan' are macros in C99, are not mentioned in C++03 and are
regular functions in C++11 (some C++ standard libraries such as GNU's
libstdc++ do implement those functions in C++98 and C++03 mode).

Simplify the current checks by unconditionally using math.h instead: this
allows us not to care about whether the `std' namespace is required and
assumes both `isinf' and `isnan' are macros, which are implemented when
undefined.


This addresses bug 320803.
    http://bugs.kde.org/show_bug.cgi?id=320803


Diffs
-----

  CMakeLists.txt e20bd410d4f1b7201aef2d1e1f294c742f78de92 
  knumber/knumber_float.cpp 51eaa8884ce522dcada3e963c47fadfcdc8af445 

Diff: http://git.reviewboard.kde.org/r/111509/diff/


Testing
-------

Built fine on FreeBSD with both libc++ and libstdc++. Testing on OpenBSD and OS X are appreciated.


Thanks,

Raphael Kubo da Costa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20130714/9cfba799/attachment.html>


More information about the Kde-utils-devel mailing list