Workaround MSVC bug
This commit is contained in:
parent
3082620ef9
commit
a8b9a8c56d
|
|
@ -22,14 +22,13 @@ namespace Nz::GL
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
template<typename>
|
template<typename FuncType, std::size_t FuncIndex, typename>
|
||||||
struct GLWrapper;
|
struct GLWrapper;
|
||||||
|
|
||||||
template<typename Ret, typename... Args>
|
template<typename FuncType, std::size_t FuncIndex, typename Ret, typename... Args>
|
||||||
struct GLWrapper<Ret(Args...)>
|
struct GLWrapper<FuncType, FuncIndex, Ret(Args...)>
|
||||||
{
|
{
|
||||||
template<typename FuncType, std::size_t FuncIndex>
|
static auto WrapErrorHandling()
|
||||||
auto WrapErrorHandling()
|
|
||||||
{
|
{
|
||||||
return [](Args... args) -> Ret
|
return [](Args... args) -> Ret
|
||||||
{
|
{
|
||||||
|
|
@ -79,8 +78,8 @@ namespace Nz::GL
|
||||||
{
|
{
|
||||||
if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion
|
if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion
|
||||||
{
|
{
|
||||||
GLWrapper<std::remove_pointer_t<FuncType>> wrapper;
|
using Wrapper = GLWrapper<FuncType, FuncIndex, std::remove_pointer_t<FuncType>>;
|
||||||
func = wrapper.template WrapErrorHandling<FuncType, FuncIndex>();
|
func = Wrapper::WrapErrorHandling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue