Skip to content

Commit

Permalink
Fix argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Oct 3, 2023
1 parent bfc8102 commit 52372fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/momo/html_ui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ namespace momo
}

size_t index = 0;
std::tuple args
{
resolve_html_value<std::remove_cv_t<std::remove_reference_t<Args>>>(args, index)...
};

if constexpr (std::is_same_v<Return, void>)
{
fun(resolve_html_value<std::remove_cv_t<std::remove_reference_t<Args>>>(args, index)...);
std::apply(fun, std::move(args));
return {};
}
else
{
auto ret = fun(resolve_html_value<std::remove_cv_t<std::remove_reference_t<Args>>>(args, index)...);
auto ret = std::apply(fun, std::move(args));
return html_value(std::move(ret));
}
};
Expand Down

0 comments on commit 52372fe

Please sign in to comment.