Browse Source

math: workaround for an apparent Visual Studio compiler bug in

template specialisation order.
legacy
Sam Hocevar sam 13 years ago
parent
commit
43b55669a4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/lol/math/real.h

+ 3
- 0
src/lol/math/real.h View File

@@ -276,6 +276,8 @@ template<> real fmod(real const &x, real const &y);
template<> void real::hexprint() const; template<> void real::hexprint() const;
template<> void real::print(int ndigits) 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_0;
template<> real const real::R_1; template<> real const real::R_1;
template<> real const real::R_2; 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_SQRT2;
template<> real const real::R_SQRT3; template<> real const real::R_SQRT3;
template<> real const real::R_SQRT1_2; template<> real const real::R_SQRT1_2;
#endif


} /* namespace lol */ } /* namespace lol */




Loading…
Cancel
Save