From 7898f9b0f3b74b6c28dc42434c04a40d0f2308eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Apr 2014 13:37:33 +0200 Subject: [PATCH] GCC 4.4 compatibility: ambiguous std::to_string() overload. --- src/Magnum/AbstractShaderProgram.cpp | 16 ++++++++++++++-- src/Magnum/Shader.cpp | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/Magnum/AbstractShaderProgram.cpp b/src/Magnum/AbstractShaderProgram.cpp index 53ed4ed91..67eae2ec8 100644 --- a/src/Magnum/AbstractShaderProgram.cpp +++ b/src/Magnum/AbstractShaderProgram.cpp @@ -299,7 +299,13 @@ bool AbstractShaderProgram::link(std::initializer_list(i)); + #endif + } out << " failed with the following message:\n" << message; @@ -309,7 +315,13 @@ bool AbstractShaderProgram::link(std::initializer_list(i)); + #endif + } out << " succeeded with the following message:\n" << message; } diff --git a/src/Magnum/Shader.cpp b/src/Magnum/Shader.cpp index ac6e795a1..78ad3cf0f 100644 --- a/src/Magnum/Shader.cpp +++ b/src/Magnum/Shader.cpp @@ -679,7 +679,13 @@ bool Shader::compile(std::initializer_list> shade out.setFlag(Debug::SpaceAfterEachValue, false); out << "Shader::compile(): compilation of " << shaderName(shader._type) << " shader"; - if(shaders.size() != 1) out << ' ' << std::to_string(i); + if(shaders.size() != 1) { + #ifndef CORRADE_GCC44_COMPATIBILITY + out << ' ' << std::to_string(i); + #else + out << ' ' << std::to_string(static_cast(i)); + #endif + } out << " failed with the following message:\n" << message; @@ -690,7 +696,13 @@ bool Shader::compile(std::initializer_list> shade out.setFlag(Debug::SpaceAfterEachValue, false); out << "Shader::compile(): compilation of " << shaderName(shader._type) << " shader"; - if(shaders.size() != 1) out << ' ' << std::to_string(i); + if(shaders.size() != 1) { + #ifndef CORRADE_GCC44_COMPATIBILITY + out << ' ' << std::to_string(i); + #else + out << ' ' << std::to_string(static_cast(i)); + #endif + } out << " succeeded with the following message:\n" << message; }