From 50bf219e53c4b3a40493b058f2cca9f7b8ef4c47 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Sun, 2 Dec 2018 20:14:53 +0100 Subject: [PATCH] Text: fix ambiguous overload error that's happening with C++17 onwards. --- src/Magnum/Text/GlyphCache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Text/GlyphCache.cpp b/src/Magnum/Text/GlyphCache.cpp index bb19a5cc2..c3ffce3cc 100644 --- a/src/Magnum/Text/GlyphCache.cpp +++ b/src/Magnum/Text/GlyphCache.cpp @@ -64,8 +64,9 @@ void GlyphCache::initialize(const GL::TextureFormat internalFormat, const Vector .setMagnificationFilter(GL::SamplerFilter::Linear) .setStorage(1, internalFormat, size); - /* Default "Not Found" glyph */ - glyphs.insert({0, {}}); + /* Default "Not Found" glyph. Can't do just `.insert({0, {}})` because + that's ambiguous in C++17, due to a new insert(node_type&&) overload. */ + glyphs.insert({0, std::pair{}}); } std::vector GlyphCache::reserve(const std::vector& sizes) {