Skip to content

Commit afa9c5e

Browse files
committed
fix init_bad_call
1 parent 3d9a680 commit afa9c5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/boost/openmethod/core.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ struct init_bad_call {
19251925
static auto fn(bad_call& error, const Arg& arg, const Args&... args) {
19261926
if constexpr (Index == 0u) {
19271927
error.method = Rtti::template static_type<Method>();
1928-
error.arity = sizeof...(args);
1928+
error.arity = sizeof...(args) + 1;
19291929
}
19301930

19311931
type_id arg_type_id;
@@ -1957,8 +1957,8 @@ using method_base = std::conditional_t<
19571957

19581958
template<typename T, class Registry>
19591959
struct parameter_traits {
1960-
static auto peek(const T&) {
1961-
return nullptr;
1960+
static auto peek(const T& value) -> const T&{
1961+
return value;
19621962
}
19631963

19641964
template<typename>

0 commit comments

Comments
 (0)