Workaround MSVC bug

This commit is contained in:
Jérôme Leclercq 2020-09-04 14:18:57 +02:00
parent 3082620ef9
commit a8b9a8c56d
1 changed files with 6 additions and 7 deletions

View File

@ -22,14 +22,13 @@ namespace Nz::GL
namespace
{
template<typename>
template<typename FuncType, std::size_t FuncIndex, typename>
struct GLWrapper;
template<typename Ret, typename... Args>
struct GLWrapper<Ret(Args...)>
template<typename FuncType, std::size_t FuncIndex, typename Ret, typename... Args>
struct GLWrapper<FuncType, FuncIndex, Ret(Args...)>
{
template<typename FuncType, std::size_t FuncIndex>
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<std::remove_pointer_t<FuncType>> wrapper;
func = wrapper.template WrapErrorHandling<FuncType, FuncIndex>();
using Wrapper = GLWrapper<FuncType, FuncIndex, std::remove_pointer_t<FuncType>>;
func = Wrapper::WrapErrorHandling();
}
}
#endif