cmath: account for MSVCRT 12.0 changes
MSVCRT 12.0 introduces better compatibility for C99. This includes a number of math routines that were previously undefined. Use the crtversion.h header to detect the version of MSVCRT being targeted and avoid re-declaring the variables. Since copysign has been introduced in MSVCRT, importing the definition via using makes it difficult to provide overloads (due to minor differences between throw () and noexcept. Avoid defining the overloads on newer MSVCRT targets. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h> // _FPCLASS_PN etc.
|
||||
#include <crtversion.h>
|
||||
|
||||
#if ((_VC_CRT_MAJOR_VERSION-0) < 12)
|
||||
// Necessary?
|
||||
typedef float float_t;
|
||||
typedef double double_t;
|
||||
@@ -109,7 +111,7 @@ _LIBCPP_ALWAYS_INLINE int fpclassify( double num )
|
||||
{
|
||||
return _fpclass(num);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MSVCRT
|
||||
|
||||
#endif // _LIBCPP_SUPPORT_WIN32_MATH_WIN32_H
|
||||
|
Reference in New Issue
Block a user