From 9ab2a1553c5de07e7a6083dc6369feaef897742a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 17 Jan 2017 15:47:59 +0100 Subject: [PATCH] Fix compilation on GCC 6.3. This is just sad. --- src/Magnum/AbstractTexture.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index e3f3dad94..98439a3ba 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -120,7 +120,9 @@ void AbstractTexture::unbind(const Int textureUnit) { /* Unbind the texture, reset state tracker */ Context::current().state().texture->unbindImplementation(textureUnit); - textureState.bindings[textureUnit] = {}; + /* libstdc++ since GCC 6.3 can't handle just = {} (ambiguous overload of + operator=) */ + textureState.bindings[textureUnit] = std::pair{}; } void AbstractTexture::unbindImplementationDefault(const GLint textureUnit) { @@ -237,7 +239,9 @@ AbstractTexture::~AbstractTexture() { /* Remove all bindings */ for(auto& binding: Context::current().state().texture->bindings) { /* MSVC 2015 needs the parentheses around */ - if(binding.second == _id) binding = {}; + /* libstdc++ since GCC 6.3 can't handle just = {} (ambiguous overload + of operator=) */ + if(binding.second == _id) binding = std::pair{}; } #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)