mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 11:40:35 +07:00
fix github issue #15
This commit is contained in:
@@ -44,7 +44,11 @@ namespace meta_hpp::detail
|
||||
throw_exception_with("an attempt to call a function with incorrect argument types");
|
||||
}
|
||||
|
||||
if constexpr ( as_void ) {
|
||||
if constexpr ( std::is_void_v<return_type> ) {
|
||||
function(
|
||||
args[Is].cast<type_list_at_t<Is, argument_types>>()...);
|
||||
return uvalue{};
|
||||
} else if constexpr ( stdex::same_as<Policy, function_policy::discard_return> ) {
|
||||
std::ignore = function(
|
||||
args[Is].cast<type_list_at_t<Is, argument_types>>()...);
|
||||
return uvalue{};
|
||||
|
||||
@@ -50,9 +50,12 @@ namespace meta_hpp::detail
|
||||
throw_exception_with("an attempt to call a method with incorrect argument types");
|
||||
}
|
||||
|
||||
if constexpr ( as_void ) {
|
||||
if constexpr ( std::is_void_v<return_type> ) {
|
||||
(inst.cast<qualified_type>().*method)(
|
||||
args[Is].cast<type_list_at_t<Is, argument_types>>()...);
|
||||
return uvalue{};
|
||||
} else if constexpr ( stdex::same_as<Policy, method_policy::discard_return> ) {
|
||||
std::ignore = (inst.cast<qualified_type>().*method)(
|
||||
inst.cast<qualified_type>(),
|
||||
args[Is].cast<type_list_at_t<Is, argument_types>>()...);
|
||||
return uvalue{};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user