diff --git a/napi-inl.h b/napi-inl.h index 3b79809c8..4761f19cf 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -255,8 +255,8 @@ struct ThreadSafeFinalize { }; template -typename std::enable_if::type static inline CallJsWrapper( - napi_env env, napi_value jsCallback, void* context, void* data) { +inline typename std::enable_if(nullptr)>::type +CallJsWrapper(napi_env env, napi_value jsCallback, void* context, void* data) { call(env, Function(env, jsCallback), static_cast(context), @@ -264,8 +264,11 @@ typename std::enable_if::type static inline CallJsWrapper( } template -typename std::enable_if::type static inline CallJsWrapper( - napi_env env, napi_value jsCallback, void* /*context*/, void* /*data*/) { +inline typename std::enable_if(nullptr)>::type +CallJsWrapper(napi_env env, + napi_value jsCallback, + void* /*context*/, + void* /*data*/) { if (jsCallback != nullptr) { Function(env, jsCallback).Call(0, nullptr); }