From 54fc071d2b0d8d4d23e87b12ecebd4cdc38bed97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 Sep 2015 00:07:35 +0200 Subject: [PATCH] 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. --- src/Magnum/Math/Test/ConstantsTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Math/Test/ConstantsTest.cpp b/src/Magnum/Math/Test/ConstantsTest.cpp index e68626dd9..98823f9af 100644 --- a/src/Magnum/Math/Test/ConstantsTest.cpp +++ b/src/Magnum/Math/Test/ConstantsTest.cpp @@ -78,7 +78,10 @@ template void ConstantsTest::_constants() { } template void ConstantsTest::_specials() { - constexpr T a = Constants::nan(); + #ifndef CORRADE_MSVC2015_COMPATIBILITY /* NaN is not constexpr */ + constexpr + #endif + T a = Constants::nan(); CORRADE_VERIFY(std::isnan(a)); CORRADE_VERIFY(a != a);