|
|
@@ -100,7 +100,7 @@ class delegate<Ret(Args...)> {
|
|
|
[[nodiscard]] auto wrap(std::index_sequence<Index...>) ENTT_NOEXCEPT {
|
|
|
return [](const void *, Args... args) -> Ret {
|
|
|
[[maybe_unused]] const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
- return Ret(std::invoke(Candidate, std::forward<std::tuple_element_t<Index, std::tuple<Args...>>>(std::get<Index>(arguments))...));
|
|
|
+ return Ret(std::invoke(Candidate, std::forward<type_list_element_t<Index, type_list<Args...>>>(std::get<Index>(arguments))...));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
@@ -109,7 +109,7 @@ class delegate<Ret(Args...)> {
|
|
|
return [](const void *payload, Args... args) -> Ret {
|
|
|
[[maybe_unused]] const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
|
|
|
- return Ret(std::invoke(Candidate, *curr, std::forward<std::tuple_element_t<Index, std::tuple<Args...>>>(std::get<Index>(arguments))...));
|
|
|
+ return Ret(std::invoke(Candidate, *curr, std::forward<type_list_element_t<Index, type_list<Args...>>>(std::get<Index>(arguments))...));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
@@ -118,7 +118,7 @@ class delegate<Ret(Args...)> {
|
|
|
return [](const void *payload, Args... args) -> Ret {
|
|
|
[[maybe_unused]] const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
|
|
|
- return Ret(std::invoke(Candidate, curr, std::forward<std::tuple_element_t<Index, std::tuple<Args...>>>(std::get<Index>(arguments))...));
|
|
|
+ return Ret(std::invoke(Candidate, curr, std::forward<type_list_element_t<Index, type_list<Args...>>>(std::get<Index>(arguments))...));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
@@ -180,7 +180,7 @@ public:
|
|
|
return Ret(std::invoke(Candidate, std::forward<Args>(args)...));
|
|
|
};
|
|
|
} else if constexpr(std::is_member_pointer_v<decltype(Candidate)>) {
|
|
|
- fn = wrap<Candidate>(internal::index_sequence_for<std::tuple_element_t<0, std::tuple<Args...>>>(internal::function_pointer_t<decltype(Candidate)>{}));
|
|
|
+ fn = wrap<Candidate>(internal::index_sequence_for<type_list_element_t<0, type_list<Args...>>>(internal::function_pointer_t<decltype(Candidate)>{}));
|
|
|
} else {
|
|
|
fn = wrap<Candidate>(internal::index_sequence_for(internal::function_pointer_t<decltype(Candidate)>{}));
|
|
|
}
|