Browse Source

MSVC 2015 compatibility: NaN is not constexpr.

It probably complains only because one of them (the float one) is
constexpr and the other is not. Whatever.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
54fc071d2b
  1. 5
      src/Magnum/Math/Test/ConstantsTest.cpp

5
src/Magnum/Math/Test/ConstantsTest.cpp

@ -78,7 +78,10 @@ template<class T> void ConstantsTest::_constants() {
} }
template<class T> void ConstantsTest::_specials() { template<class T> void ConstantsTest::_specials() {
constexpr T a = Constants<T>::nan(); #ifndef CORRADE_MSVC2015_COMPATIBILITY /* NaN is not constexpr */
constexpr
#endif
T a = Constants<T>::nan();
CORRADE_VERIFY(std::isnan(a)); CORRADE_VERIFY(std::isnan(a));
CORRADE_VERIFY(a != a); CORRADE_VERIFY(a != a);

Loading…
Cancel
Save