From 43b55669a456bb4e704f336edc2ff62ea81dd76b Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 13 May 2012 21:38:18 +0000 Subject: [PATCH] math: workaround for an apparent Visual Studio compiler bug in template specialisation order. --- src/lol/math/real.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lol/math/real.h b/src/lol/math/real.h index 63819b1e..aec92523 100644 --- a/src/lol/math/real.h +++ b/src/lol/math/real.h @@ -276,6 +276,8 @@ template<> real fmod(real const &x, real const &y); template<> void real::hexprint() const; template<> void real::print(int ndigits) const; +/* FIXME: why doesn't this work on Visual Studio? */ +#if !defined _MSC_VER template<> real const real::R_0; template<> real const real::R_1; template<> real const real::R_2; @@ -297,6 +299,7 @@ template<> real const real::R_2_SQRTPI; template<> real const real::R_SQRT2; template<> real const real::R_SQRT3; template<> real const real::R_SQRT1_2; +#endif } /* namespace lol */