From 6d7558672d644769daa3b9d8ab1a94fca4e95d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 21 Oct 2018 22:48:34 +0200 Subject: [PATCH] Math: MSVC 2015 constexpr fun! --- src/Magnum/Math/Test/RangeTest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Math/Test/RangeTest.cpp b/src/Magnum/Math/Test/RangeTest.cpp index f3f0cb958..946af47a1 100644 --- a/src/Magnum/Math/Test/RangeTest.cpp +++ b/src/Magnum/Math/Test/RangeTest.cpp @@ -393,8 +393,14 @@ void RangeTest::access() { CORRADE_COMPARE(rect.data(), static_cast(&rect)); CORRADE_COMPARE(cube.data(), static_cast(&cube)); constexpr Int lineData = *cline.data(); - constexpr Int rectData = *crect.data(); - constexpr Int cubeData = *ccube.data(); + #ifndef CORRADE_MSVC2015_COMPATIBILITY /* Apparently dereferencing a pointer is verboten */ + constexpr + #endif + Int rectData = *crect.data(); + #ifndef CORRADE_MSVC2015_COMPATIBILITY /* Apparently dereferencing a pointer is verboten */ + constexpr + #endif + Int cubeData = *ccube.data(); CORRADE_COMPARE(lineData, 34); CORRADE_COMPARE(rectData, 34); CORRADE_COMPARE(cubeData, 34);