|
|
@@ -98,7 +98,7 @@ class delegate<Ret(Args...)> {
|
|
|
template<auto Candidate, std::size_t... Index>
|
|
|
[[nodiscard]] auto wrap(std::index_sequence<Index...>) ENTT_NOEXCEPT {
|
|
|
return [](const void *, Args... args) -> Ret {
|
|
|
- const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
+ [[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))...));
|
|
|
};
|
|
|
}
|
|
|
@@ -106,7 +106,7 @@ class delegate<Ret(Args...)> {
|
|
|
template<auto Candidate, typename Type, std::size_t... Index>
|
|
|
[[nodiscard]] auto wrap(Type &, std::index_sequence<Index...>) ENTT_NOEXCEPT {
|
|
|
return [](const void *payload, Args... args) -> Ret {
|
|
|
- const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
+ [[maybe_unused]] const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
Type *curr = static_cast<Type *>(const_cast<std::conditional_t<std::is_const_v<Type>, const void *, void *>>(payload));
|
|
|
return Ret(std::invoke(Candidate, *curr, std::forward<std::tuple_element_t<Index, std::tuple<Args...>>>(std::get<Index>(arguments))...));
|
|
|
};
|
|
|
@@ -115,7 +115,7 @@ class delegate<Ret(Args...)> {
|
|
|
template<auto Candidate, typename Type, std::size_t... Index>
|
|
|
[[nodiscard]] auto wrap(Type *, std::index_sequence<Index...>) ENTT_NOEXCEPT {
|
|
|
return [](const void *payload, Args... args) -> Ret {
|
|
|
- const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
+ [[maybe_unused]] const auto arguments = std::forward_as_tuple(std::forward<Args>(args)...);
|
|
|
Type *curr = static_cast<Type *>(const_cast<std::conditional_t<std::is_const_v<Type>, const void *, void *>>(payload));
|
|
|
return Ret(std::invoke(Candidate, curr, std::forward<std::tuple_element_t<Index, std::tuple<Args...>>>(std::get<Index>(arguments))...));
|
|
|
};
|