common: Don't include intrin.h in a namespace

Fixes compilation with VS2017
This commit is contained in:
Florent Castelli 2017-03-08 06:38:05 +01:00
parent cf68ecf066
commit b69d3f13cb

View File

@ -10,6 +10,10 @@
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#ifdef _MSC_VER
#include <intrin.h>
#endif
namespace MathUtil namespace MathUtil
{ {
template <typename T> template <typename T>
@ -24,7 +28,6 @@ constexpr T SNANConstant()
// will use __builtin_nans, which is improperly handled by the compiler and generates // 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. // 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. // TODO: Remove this and use numeric_limits directly whenever this bug is fixed.
#include <intrin.h>
template <> template <>
constexpr double SNANConstant() constexpr double SNANConstant()