Try to get around MSVC bug

This commit is contained in:
Jérôme Leclercq 2020-09-03 15:47:43 +02:00
parent 58efffc51f
commit addcd52552
1 changed files with 5 additions and 2 deletions

View File

@ -29,7 +29,7 @@ namespace Nz::GL
struct GLWrapper<Ret(Args...)>
{
template<typename FuncType, std::size_t FuncIndex>
static auto WrapErrorHandling()
auto WrapErrorHandling()
{
return [](Args... args) -> Ret
{
@ -78,7 +78,10 @@ namespace Nz::GL
if (func)
{
if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion
func = GLWrapper<std::remove_pointer_t<FuncType>>::template WrapErrorHandling<FuncType, FuncIndex>();
{
GLWrapper<std::remove_pointer_t<FuncType>> wrapper;
func = wrapper.template WrapErrorHandling<FuncType, FuncIndex>();
}
}
#endif