From a8b9a8c56dd270de4582333d80c7e2ae670fabb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 4 Sep 2020 14:18:57 +0200 Subject: [PATCH] Workaround MSVC bug --- src/Nazara/OpenGLRenderer/Wrapper/Context.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp index bc6f26c2f..7742bfe1d 100644 --- a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp +++ b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp @@ -22,14 +22,13 @@ namespace Nz::GL namespace { - template + template struct GLWrapper; - template - struct GLWrapper + template + struct GLWrapper { - template - auto WrapErrorHandling() + static auto WrapErrorHandling() { return [](Args... args) -> Ret { @@ -79,8 +78,8 @@ namespace Nz::GL { if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion { - GLWrapper> wrapper; - func = wrapper.template WrapErrorHandling(); + using Wrapper = GLWrapper>; + func = Wrapper::WrapErrorHandling(); } } #endif