Skip to content

Commit

Permalink
fix first non-virtual multi-method parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Oct 8, 2024
1 parent 11b2720 commit c0078e2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions include/yorel/yomm2/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ struct method<Key, R(A...), Policy> : detail::method_info {
std::uintptr_t
resolve_uni(const ArgType& arg, const MoreArgTypes&... more_args) const;

template<
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
typename... MoreArgTypes>
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
std::uintptr_t resolve_multi_first(
const ArgType& arg, const MoreArgTypes&... more_args) const;

Expand Down Expand Up @@ -457,7 +455,7 @@ method<Key, R(A...), Policy>::resolve(const ArgType&... args) const {
if constexpr (arity == 1) {
pf = resolve_uni<types<A...>, ArgType...>(args...);
} else {
pf = resolve_multi_first<0, types<A...>, ArgType...>(args...);
pf = resolve_multi_first<types<A...>, ArgType...>(args...);
}

return reinterpret_cast<function_pointer_type>(pf);
Expand Down Expand Up @@ -527,9 +525,7 @@ inline std::uintptr_t method<Key, R(A...), Policy>::resolve_uni(
}

template<typename Key, typename R, class Policy, typename... A>
template<
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
typename... MoreArgTypes>
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
inline std::uintptr_t method<Key, R(A...), Policy>::resolve_multi_first(
const ArgType& arg, const MoreArgTypes&... more_args) const {

Expand Down

0 comments on commit c0078e2

Please sign in to comment.