diff --git a/src/Native.hpp b/src/Native.hpp index c2cd21af..9f46b3c7 100644 --- a/src/Native.hpp +++ b/src/Native.hpp @@ -648,8 +648,7 @@ InternalStoreHelper::set(T&& value) const { } template -inline internal::type_t, - std::void_t::toScript)>...> +inline internal::type_t, decltype(&internal::TypeConverter::toScript)...> Local::call(const Local& thiz, T&&... args) const { return call(thiz, {internal::TypeConverter::toScript(std::forward(args))...}); } @@ -660,8 +659,7 @@ std::function Local::wrapper(const Local& thiz) const } template -inline internal::type_t, - std::void_t::toScript)>...> +inline internal::type_t, decltype(&internal::TypeConverter::toScript)...> Object::newObject(const Local& type, T&&... args) { return newObject(type, {internal::TypeConverter::toScript(std::forward(args))...}); } @@ -685,9 +683,8 @@ inline Local Array::newArray(const std::initializer_list>& e } template -inline internal::type_t, - std::void_t::toScript)>...> -Array::of(T&&... args) { +inline internal::type_t, decltype(&internal::TypeConverter::toScript)...> Array::of( + T&&... args) { return newArray({internal::TypeConverter::toScript(std::forward(args))...}); } @@ -736,8 +733,7 @@ ScriptEngine::set(StringLike&& keyStringLike, T&& value) { } template -inline internal::type_t, - std::void_t::toScript)>...> +inline internal::type_t, decltype(&internal::TypeConverter::toScript)...> ScriptEngine::newNativeClass(T&&... args) { return newNativeClass({internal::TypeConverter::toScript(std::forward(args))...}); }