From a156593a895e53e151e19ddb4c8d0c17cb27ec87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 24 Nov 2013 19:51:51 +0100 Subject: [PATCH] Hopefully finally fixed constexpr issues in ColorTest with GCC 4.6. Follow-up to 80b61be4851910d575547516e6ce75b883aca4a4, I am too lazy to test it before commiting. --- src/Test/ColorTest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Test/ColorTest.cpp b/src/Test/ColorTest.cpp index d7dc1926a..4f70770d0 100644 --- a/src/Test/ColorTest.cpp +++ b/src/Test/ColorTest.cpp @@ -156,11 +156,17 @@ void ColorTest::constructConversion() { typedef BasicColor4 Color4ub; constexpr Color3 a(10.1f, 12.5f, 0.75f); - constexpr Color3ub b(a); + #ifndef CORRADE_GCC46_COMPATIBILITY + constexpr /* Not constexpr under GCC < 4.7 */ + #endif + Color3ub b(a); CORRADE_COMPARE(b, Color3ub(10, 12, 0)); constexpr Color4 c(10.1f, 12.5f, 0.75f, 5.25f); - constexpr Color4ub d(c); + #ifndef CORRADE_GCC46_COMPATIBILITY + constexpr /* Not constexpr under GCC < 4.7 */ + #endif + Color4ub d(c); CORRADE_COMPARE(d, Color4ub(10, 12, 0, 5)); /* Implicit conversion is not allowed */