Skip to content

Commit dc54e7f

Browse files
authored
Workaround build error(C3546) in vs2022(v17.11.2) (#107)
1 parent df62328 commit dc54e7f

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/Native.hpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,7 @@ InternalStoreHelper::set(T&& value) const {
648648
}
649649

650650
template <typename... T>
651-
inline internal::type_t<Local<Value>,
652-
std::void_t<decltype(&internal::TypeConverter<T>::toScript)>...>
651+
inline internal::type_t<Local<Value>, decltype(&internal::TypeConverter<T>::toScript)...>
653652
Local<Function>::call(const Local<Value>& thiz, T&&... args) const {
654653
return call(thiz, {internal::TypeConverter<T>::toScript(std::forward<T>(args))...});
655654
}
@@ -660,8 +659,7 @@ std::function<FuncType> Local<Function>::wrapper(const Local<Value>& thiz) const
660659
}
661660

662661
template <typename... T>
663-
inline internal::type_t<Local<Object>,
664-
std::void_t<decltype(&internal::TypeConverter<T>::toScript)>...>
662+
inline internal::type_t<Local<Object>, decltype(&internal::TypeConverter<T>::toScript)...>
665663
Object::newObject(const Local<Value>& type, T&&... args) {
666664
return newObject(type, {internal::TypeConverter<T>::toScript(std::forward<T>(args))...});
667665
}
@@ -685,9 +683,8 @@ inline Local<Array> Array::newArray(const std::initializer_list<Local<Value>>& e
685683
}
686684

687685
template <typename... T>
688-
inline internal::type_t<Local<Array>,
689-
std::void_t<decltype(&internal::TypeConverter<T>::toScript)>...>
690-
Array::of(T&&... args) {
686+
inline internal::type_t<Local<Array>, decltype(&internal::TypeConverter<T>::toScript)...> Array::of(
687+
T&&... args) {
691688
return newArray({internal::TypeConverter<T>::toScript(std::forward<T>(args))...});
692689
}
693690

@@ -736,8 +733,7 @@ ScriptEngine::set(StringLike&& keyStringLike, T&& value) {
736733
}
737734

738735
template <typename D, typename... T>
739-
inline internal::type_t<Local<Object>,
740-
std::void_t<decltype(&internal::TypeConverter<T>::toScript)>...>
736+
inline internal::type_t<Local<Object>, decltype(&internal::TypeConverter<T>::toScript)...>
741737
ScriptEngine::newNativeClass(T&&... args) {
742738
return newNativeClass<D>({internal::TypeConverter<T>::toScript(std::forward<T>(args))...});
743739
}

0 commit comments

Comments
 (0)