msvc: remove workarounds for old compiler issues

This commit is contained in:
Shawn Hoffman
2021-06-03 16:06:52 -07:00
parent 4363f9d4c7
commit 4ce22c093c
2 changed files with 0 additions and 39 deletions

View File

@ -10,18 +10,6 @@
#include "Common/BitUtils.h"
#include "Common/CommonTypes.h"
#ifdef _MSC_VER
// MSVC needs a workaround, because its std::numeric_limits<double>::signaling_NaN()
// will use __builtin_nans, which is improperly handled by the compiler and generates
// a bad constant. Here we go back to the version MSVC used before the builtin.
// TODO: Remove this and use numeric_limits directly whenever this bug is fixed.
// See Visual Studio bug # 128935 "std::numeric_limits<float>::signaling_NaN() is broken"
#include <ymath.h>
#endif // _MSC_VER
namespace Common
{
template <typename T>
@ -30,23 +18,6 @@ constexpr T SNANConstant()
return std::numeric_limits<T>::signaling_NaN();
}
#ifdef _MSC_VER
// See workaround note above.
template <>
constexpr double SNANConstant()
{
return (_CSTD _Snan._Double);
}
template <>
constexpr float SNANConstant()
{
return (_CSTD _Snan._Float);
}
#endif // _MSC_VER
// The most significant bit of the fraction is an is-quiet bit on all architectures we care about.
enum : u64
{