From 6ec472038bb4870ac2e9b32ddda8d37a6366082b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 20:50:10 +0200 Subject: [PATCH] GCC 4.4 compatibility: ambiguous std::to_string() call. It shouldn't be. What is ambiguous in conversion from `unsigned long int` to `unsigned long long int`? --- src/Shader.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Shader.cpp b/src/Shader.cpp index bdcb748fd..5da6f486c 100644 --- a/src/Shader.cpp +++ b/src/Shader.cpp @@ -103,7 +103,14 @@ Shader& Shader::addSource(std::string source) { if(!source.empty()) { /* Fix line numbers, so line 41 of third added file is marked as 3(41). Source 0 is the #version string added in constructor. */ - sources.push_back("#line 1 " + std::to_string((sources.size()+1)/2) + '\n'); + sources.push_back("#line 1 " + + /* This shouldn't be ambiguous. But is. */ + #ifndef CORRADE_GCC44_COMPATIBILITY + std::to_string((sources.size()+1)/2) + + #else + std::to_string(static_cast(sources.size()+1)/2) + + #endif + '\n'); sources.push_back(std::move(source)); }