From 7bb580e03b3566754038f2ceb53b87f57c013097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 17 Mar 2013 18:42:12 +0100 Subject: [PATCH] GCC 4.6 compatibility: this can't be constexpr, don't know why. --- src/DebugTools/ForceRenderer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/DebugTools/ForceRenderer.cpp b/src/DebugTools/ForceRenderer.cpp index 9b9fdd25a..63583685a 100644 --- a/src/DebugTools/ForceRenderer.cpp +++ b/src/DebugTools/ForceRenderer.cpp @@ -40,14 +40,23 @@ template ResourceKey shaderKey(); template<> inline ResourceKey shaderKey<2>() { return ResourceKey("FlatShader2D"); } template<> inline ResourceKey shaderKey<3>() { return ResourceKey("FlatShader3D"); } +/** @bug Why this is not constexpr under GCC 4.6? */ +#ifndef CORRADE_GCC46_COMPATIBILITY constexpr std::array positions{{ +#else +const std::array positions{{ +#endif {0.0f, 0.0f}, {1.0f, 0.0f}, {0.9f, 0.1f}, {0.9f, -0.1f} }}; +#ifndef CORRADE_GCC46_COMPATIBILITY constexpr std::array indices{{ +#else +const std::array indices{{ +#endif 0, 1, 1, 2, 1, 3